tvtime: audio routing from external (usb) TV card

Bug #340769 reported by Remove Me
22
This bug affects 2 people
Affects Status Importance Assigned to Milestone
tvtime (Ubuntu)
Fix Released
Wishlist
Unassigned

Bug Description

Binary package hint: tvtime

I have an USB TV card:
http://www.pinnaclesys.com/PublicSite/uk/Products/Consumer+Products/PCTV+Tuners/PCTV+Mac/Pinnacle+TV+for+Mac+Hybrid+Stick.htm

The card has its own associated set of problems, but one of them is
more generic: routing of the audio stream into the host system.
There was a patch regarding "sound bridge" on tvtime's homepage:
http://sourceforge.net/tracker2/?func=detail&aid=1657446&group_id=64301&atid=506989
Sadly, the patch's link is dead (and the project looks dead since 2008).
Having no experience with ALSA, I hacked together the patch (against tvtime-1.0.2).

So, if either someone can do that better, or has the "sound bridge" patch
mentioned, please drop me a line. I believe that there can be others who
would find the feature useful. It's sad to see the project die, tvtime is a
very small, fast and simple program. Clean coding, too.

Related branches

Revision history for this message
Remove Me (remove-me) wrote :
Revision history for this message
Remove Me (remove-me) wrote :

Err.... Sorry for reporting this as a bug. It is of course more of a feature request,
just couldn't find where to ask for it (the original site looking very dead by now).

Revision history for this message
dforsi (daniele-forsi) wrote :

Looking at the attachments in this bug report, I noticed that an attachment was not flagged as a patch. A patch contains changes to an Ubuntu package that will resolve a bug and this attachment is one! Subsequently, I've checked the patch flag for it. In the future when submitting patches please use the patch checkbox as there are some Launchpad searches that use this feature. You can learn more about the patch workflow at https://wiki.ubuntu.com/Bugs/Patches.

Revision history for this message
Remove Me (remove-me) wrote :

@dforsi: if actually take a *look* at the patch, read and understand it, you will quickly notice that the patch in question is a goddamn HACK, as it is said in the message text: "Hack in the sox as a kind of audio router"! It should NOT be applied to the project's code unless you're in dire need for audio in such a case and don't mind to remember installing sox.

I would post it in the message body if not for formatting, which would make playing with it harder.

Revision history for this message
Peter Meiser (meiser79) wrote :

I adapted a patch from Markus Rechberger to add this feature (I had to modify it to work with generic USB audio devices and PulseAudio). It works fine here under Karmic, but with a small delay between video and audio.
You can find a deb package in my PPA if you want to test it.

Revision history for this message
moparisthebest (moparisthebest) wrote :

Whoopie's patch, tested by installing tvtime from his ppa. (running Karmic amd64 here, using a WinTV-HVR 950, which worked great in tvtime except without sound) works perfectly for my setup. I was running tvtime with a script like the following:

#!/bin/sh
tvtime &
sleep 1
sox -r 48000 -b 16 -c 2 -t ossdsp /dev/dsp1 -t ossdsp /dev/dsp

And that worked although with horrendous lag between the sound and the video, it wasn't even watchable, but with Whoopie's patch tvtime works as expected with no hacks. Thanks much Whoopie, hopefully this can be integrated into the official ubuntu version in the near future

Changed in tvtime (Ubuntu):
importance: Undecided → Wishlist
Changed in tvtime (Ubuntu):
status: New → In Progress
assignee: nobody → Alessio Treglia (quadrispro)
Revision history for this message
Alessio Treglia (quadrispro) wrote :
Download full text (3.4 KiB)

tvtime.c: In function 'tvtime_main':
tvtime.c:2324: warning: ignoring return value of 'asprintf', declared with attribute warn_unused_result
tvtime.c:2327: warning: ignoring return value of 'asprintf', declared with attribute warn_unused_result
tvtime.c:2341: warning: ignoring return value of 'asprintf', declared with attribute warn_unused_result
/bin/bash ../libtool --mode=link x86_64-linux-gnu-g++ -g -O2 -Wl,-Bsymbolic-functions -o tvtime `/usr/bin/freetype-config --libs` -lz -lpng -lz -lm -lSM -lICE -lX11 -lXext -lXv -lXinerama -lXtst -lXxf86vm -lxml2 -lm -lstdc++ tvtime-mixer.o tvtime-videoinput.o tvtime-rtctimer.o tvtime-leetft.o tvtime-osdtools.o tvtime-tvtimeconf.o tvtime-pngoutput.o tvtime-tvtimeosd.o tvtime-input.o tvtime-cpu_accel.o tvtime-speedy.o tvtime-pnginput.o tvtime-deinterlace.o tvtime-videotools.o tvtime-performance.o tvtime-vbidata.o tvtime-vbiscreen.o tvtime-fifo.o tvtime-commands.o tvtime-videofilter.o tvtime-station.o tvtime-utils.o tvtime-pulldown.o tvtime-hashtable.o tvtime-cpuinfo.o tvtime-menu.o tvtime-outputfilter.o tvtime-xmltv.o tvtime-copyfunctions.o tvtime-xfullscreen.o tvtime-xvoutput.o tvtime-xcommon.o tvtime-linear.o tvtime-scalerbob.o tvtime-linearblend.o tvtime-vfir.o tvtime-greedy.o tvtime-weave.o tvtime-weavetff.o tvtime-weavebff.o tvtime-kdetv_greedyh.o tvtime-kdetv_tomsmocomp.o greedyh.o tomsmocomp.o tvtime-tvtime.o
mkdir .libs
x86_64-linux-gnu-g++ -g -O2 -Wl,-Bsymbolic-functions -o tvtime tvtime-mixer.o tvtime-videoinput.o tvtime-rtctimer.o tvtime-leetft.o tvtime-osdtools.o tvtime-tvtimeconf.o tvtime-pngoutput.o tvtime-tvtimeosd.o tvtime-input.o tvtime-cpu_accel.o tvtime-speedy.o tvtime-pnginput.o tvtime-deinterlace.o tvtime-videotools.o tvtime-performance.o tvtime-vbidata.o tvtime-vbiscreen.o tvtime-fifo.o tvtime-commands.o tvtime-videofilter.o tvtime-station.o tvtime-utils.o tvtime-pulldown.o tvtime-hashtable.o tvtime-cpuinfo.o tvtime-menu.o tvtime-outputfilter.o tvtime-xmltv.o tvtime-copyfunctions.o tvtime-xfullscreen.o tvtime-xvoutput.o tvtime-xcommon.o tvtime-linear.o tvtime-scalerbob.o tvtime-linearblend.o tvtime-vfir.o tvtime-greedy.o tvtime-weave.o tvtime-weavetff.o tvtime-weavebff.o tvtime-kdetv_greedyh.o tvtime-kdetv_tomsmocomp.o greedyh.o tomsmocomp.o tvtime-tvtime.o /usr/lib/libfreetype.so -lpng -lz -lSM -lICE -lX11 -lXext -lXv -lXinerama -lXtst -lXxf86vm /usr/lib/libxml2.so -lm -lstdc++
tvtime-tvtime.o: In function `tvtime_main':
/tmp/buildd/tvtime-1.0.2/src/tvtime.c:1581: undefined reference to `get_empia_device'
/tmp/buildd/tvtime-1.0.2/src/tvtime.c:2520: undefined reference to `alsa_join_threaded_loop'
/tmp/buildd/tvtime-1.0.2/src/tvtime.c:2521: undefined reference to `alsa_close'
/tmp/buildd/tvtime-1.0.2/src/tvtime.c:2075: undefined reference to `alsa_join_threaded_loop'
/tmp/buildd/tvtime-1.0.2/src/tvtime.c:2076: undefined reference to `alsa_close'
/tmp/buildd/tvtime-1.0.2/src/tvtime.c:2065: undefined reference to `alsa_open'
/tmp/buildd/tvtime-1.0.2/src/tvtime.c:2067: undefined reference to `alsa_start_threaded_loop'
collect2: ld returned 1 exit status
make[3]: *** [tvtime] Error 1
make[3]: Leaving directory `/tmp/buildd/tvtime-1.0.2/src'
make[2]: *** [all-recursive] Error 1
...

Read more...

Changed in tvtime (Ubuntu):
assignee: Alessio Treglia (quadrispro) → nobody
status: In Progress → Incomplete
Revision history for this message
Peter Meiser (meiser79) wrote :

Please find attached the debdiff for Karmic.

Revision history for this message
Alessio Treglia (quadrispro) wrote :

Please apologize for my last message, the mistake was mine.

Thank you for your quick reply anyway.

Changed in tvtime (Ubuntu):
assignee: nobody → Alessio Treglia (quadrispro)
status: Incomplete → In Progress
status: In Progress → Fix Committed
assignee: Alessio Treglia (quadrispro) → nobody
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package tvtime - 1.0.2-5ubuntu2

---------------
tvtime (1.0.2-5ubuntu2) lucid; urgency=low

  * Add tvtime-1.0.2-alsa.patch to enable audio routing from external TV card;
    thanks to Whoopie for the patch (LP: #340769).
  * debian/control: Build-depend on autoconf,automake,libasound2-dev,libtool.
  * debian/rules: Call autoreconf to re-generate the configure script.
 -- Alessio Treglia <email address hidden> Thu, 07 Jan 2010 09:16:55 +0100

Changed in tvtime (Ubuntu):
status: Fix Committed → Fix Released
Revision history for this message
Steffen Röcker (sroecker) wrote :

With this patch I can't start tvtime when my USB headset is connected.
tvtime quits after it finds the headset:
Found "Sennheiser USB Headset : USB Audio (hw:2,0)"

lsusb
Bus 004 Device 002: ID 1395:3556 Sennheiser Communications USB Headset

$ aplay -l
**** List of PLAYBACK Hardware Devices ****
card 0: M5455 [ALi M5455], device 0: Intel ICH [ALi M5455]
  Subdevices: 1/1
  Subdevice #0: subdevice #0
card 0: M5455 [ALi M5455], device 2: Intel ICH - IEC958 [ALi M5455 - IEC958]
  Subdevices: 1/1
  Subdevice #0: subdevice #0
card 2: Headset [Sennheiser USB Headset], device 0: USB Audio [USB Audio]
  Subdevices: 1/1
  Subdevice #0: subdevice #0

Revision history for this message
Markward Kufleitner (mkufleitner) wrote :

I have Lucid Lynx with tvtime 1.0.2-5ubuntu2 and the same problem with a USB Microphone. tvtime starts only if I unplug the Microphone, but when I plug it back in, I have to reconfigure my audio settings every time.

Please fix someone this bug.

Revision history for this message
Pascal Allegra (pascal79-deactivatedaccount) wrote :

Hi, I think we have a problem with this patch.
I was before in Ubuntu 8.04, and with the "workaround" of sox I was able to get my Hibryd card work with tvtime.

After this patch (or maybe pulseaudio) I can't heard any sound from tvtime.

pascal@Nautilus:~$ lsusb|grep Terra
Bus 001 Device 004: ID 0ccd:0042 TerraTec Electronic GmbH Cinergy Hybrid T XS

pascal@Nautilus:~$ aplay -l
**** Lista di PLAYBACK dispositivi hardware ****
scheda 0: Intel [HDA Intel], dispositivo 0: STAC92xx Analog [STAC92xx Analog]
  Sottoperiferiche: 1/1
  Sottoperiferica #0: subdevice #0
scheda 0: Intel [HDA Intel], dispositivo 1: STAC92xx Digital [STAC92xx Digital]
  Sottoperiferiche: 1/1
  Sottoperiferica #0: subdevice #0

pascal@Nautilus:~$ arecord -l
**** Lista di CAPTURE dispositivi hardware ****
scheda 0: Intel [HDA Intel], dispositivo 0: STAC92xx Analog [STAC92xx Analog]
  Sottoperiferiche: 1/1
  Sottoperiferica #0: subdevice #0
scheda 1: XS [Cinergy Hybrid T USB XS], dispositivo 0: USB Audio [USB Audio]
  Sottoperiferiche: 1/1
  Sottoperiferica #0: subdevice #0

If you need more info, let me know.

Regards,

Pascal

Revision history for this message
Steffen Röcker (sroecker) wrote :

USB headsets work again with the fixed tvtime-1.0.0.2-alsa.patch from #340769.
Can you please update it?

Revision history for this message
LGB [Gábor Lénárt] (lgb) wrote :

I've just tried tvtime since some time, and though it worked before now it exits with message "Channels count non available" and mentioning my USB webcam for some reason which should be not involved at all. It seems that message only presents in a patch which contains an URL for this bug. That's why I am writing here now. My report is bug 752980

Revision history for this message
LGB [Gábor Lénárt] (lgb) wrote :

Please note, that I have a PCI tv tuner card, not an USB based one though.

Revision history for this message
LGB [Gábor Lénárt] (lgb) wrote :

So what I ment that this fix seems to introduce problem for me which renders tvtime unusable :(

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.