LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Hardware (https://www.linuxquestions.org/questions/linux-hardware-18/)
-   -   saa7133 tv card: audio only via sox (https://www.linuxquestions.org/questions/linux-hardware-18/saa7133-tv-card-audio-only-via-sox-489014/)

Kropotkin 10-03-2006 08:22 AM

saa7133 tv card: audio only via sox
 
Hi all,

I recently popped a Pinnacle TV ard in my Fedora Core 5 system. The kernel recognized it and loaded and appropriate module.

Video works fine; image quality is very good with tvtime. But getting audio requires a workaround. For some reason, the analog patch cable doesn't work and I have to use sox to redirect audio output:

Code:

sox -r 32000 -w -t ossdsp /dev/dsp2 -t ossdsp /dev/dsp
This hack works fine for tv output, but not for recording, which I would like to get working. For this reason, I am thinking of picking up a Haupaugge PC350 card if it appears that it can manage audio output in a more elegant way.

How have others gotten sound working with Pinnacle cards? How does sound work with the Haupaugge cards? Via the audio patch cable or?...

Thanks.

Electro 10-04-2006 02:38 AM

I am not a mind reader, so what model from Pinnacle?

I wrote a script so tvtime version 1.0.2 saves the volume every time it exits. Adjust the script below for your region and setup.

Code:

#!/bin/sh
amixer -q -c 0 sset Line,0 0%,0% Cap on && \
tvtime -x /dev/mixer:line -f us-cable -d /dev/video0 -M -g 356x267 && \
amixer -q -c 0 sset Line,0 0%,0% Cap on ; \
amixer -q -c 0 sset Line,0 0%,0% mute

Use v4lctl to unmute before recording. Use the dsp device for your sound card and force the audio. Only mencoder works though.

I am using Lifeview FlyVideo 3000 (NTSC) and it works through the loop cable or patch cable.

Kropotkin 11-29-2006 06:10 PM

Sorry for the long delay in replying to this post. I have had mixed luck in getting sound working with the Pinnacle card.

Quote:

Originally Posted by Electro
I am not a mind reader, so what model from Pinnacle?

40i

Quote:

I wrote a script so tvtime version 1.0.2 saves the volume every time it exits. Adjust the script below for your region and setup.

Code:

#!/bin/sh
amixer -q -c 0 sset Line,0 0%,0% Cap on && \
tvtime -x /dev/mixer:line -f us-cable -d /dev/video0 -M -g 356x267 && \
amixer -q -c 0 sset Line,0 0%,0% Cap on ; \
amixer -q -c 0 sset Line,0 0%,0% mute


Thanks for sharing this. Leaving aside the amixer commands, I adapt this to my area:

Code:

tvtime -x /dev/mixer:line -f europe -d /dev/video0 -M -g 356x267
This works fine, except still no sound.

Quote:

Use v4lctl to unmute before recording. Use the dsp device for your sound card and force the audio. Only mencoder works though.
This is a little too terse for me to follow. I am not sure to which dsp device you are referring (there are two with kernel module saa-7134 loaded) and what you mean by "force the audio".

Following the instructions on this page http://www.linuxtv.org/v4lwiki/index.php/Talk:Em2820 I try mplayer. First I unmute:

Code:

v4lctl -c /dev/video0 volume mute off
Then, I run this command:

Code:

mplayer -tv driver=v4l2:device=/dev/video0:input=0:freq=280.25:norm=PAL:forceaudio:immediatemode=0:amode=0:alsa:adevice=hw.0:width=768:height=576 tv://
This works, as does this for recording,

Code:

mencoder tv:// -tv driver=v4l2:device=/dev/video0:outfmt=i420:amode=0:input=0:norm=PAL:adevice=hw.0:alsa:forceaudio:immediatemode=0:width=704:height=576:freq=280.25 -ovc lavc -oac lavc -lavcopts acodec=ac3:vcodec=mpeg2video:keyint=50:sc_threshold=0:vrc_eq=1:aspect=4/3:vbitrate=1800 -endpos 03:00:00 -o record.mpg
except the sound is severely deformed in some way; the sound is jerky and voices sound an octave higher, like mickey-mouse actors.

So, I am making some progress, except that the sox command no longer works; when I run this:
Code:

sox -r 32000 -w -t ossdsp /dev/dsp1 -t ossdsp /dev/dsp
I get an error message:
sox: Can't open output file '/dev/dsp': Invalid argument
even though there most definitely is /dev/dsp.

Any idea how to
1) fix the deformities in the mplayer audio output
2) get sox working again so I can use tvtime.
FWIW, I am running Fedora Core 6 with the 2.6.18-1.2849 kernel.

Thanks for any suggestions.

Zoutmax 04-29-2009 12:17 AM

maybe a fix
 
Quote:

Originally Posted by Kropotkin (Post 2523629)
Sorry for the long delay in replying to this post. I have had mixed luck in getting sound working with the Pinnacle card.



40i



Thanks for sharing this. Leaving aside the amixer commands, I adapt this to my area:

Code:

tvtime -x /dev/mixer:line -f europe -d /dev/video0 -M -g 356x267
This works fine, except still no sound.



This is a little too terse for me to follow. I am not sure to which dsp device you are referring (there are two with kernel module saa-7134 loaded) and what you mean by "force the audio".

Following the instructions on this page http://www.linuxtv.org/v4lwiki/index.php/Talk:Em2820 I try mplayer. First I unmute:

Code:

v4lctl -c /dev/video0 volume mute off
Then, I run this command:

Code:

mplayer -tv driver=v4l2:device=/dev/video0:input=0:freq=280.25:norm=PAL:forceaudio:immediatemode=0:amode=0:alsa:adevice=hw.0:width=768:height=576 tv://
This works, as does this for recording,

Code:

mencoder tv:// -tv driver=v4l2:device=/dev/video0:outfmt=i420:amode=0:input=0:norm=PAL:adevice=hw.0:alsa:forceaudio:immediatemode=0:width=704:height=576:freq=280.25 -ovc lavc -oac lavc -lavcopts acodec=ac3:vcodec=mpeg2video:keyint=50:sc_threshold=0:vrc_eq=1:aspect=4/3:vbitrate=1800 -endpos 03:00:00 -o record.mpg
except the sound is severely deformed in some way; the sound is jerky and voices sound an octave higher, like mickey-mouse actors.

So, I am making some progress, except that the sox command no longer works; when I run this:
Code:

sox -r 32000 -w -t ossdsp /dev/dsp1 -t ossdsp /dev/dsp
I get an error message:
sox: Can't open output file '/dev/dsp': Invalid argument
even though there most definitely is /dev/dsp.

Any idea how to
1) fix the deformities in the mplayer audio output
2) get sox working again so I can use tvtime.
FWIW, I am running Fedora Core 6 with the 2.6.18-1.2849 kernel.

Thanks for any suggestions.

I get it working by :
sox -q -c 2 -s -r 32000 -t alsa hw:1 -t alsa -r 32000 hw:0

I believe you have to change it like :

sox -r 32000 -t ossdsp hw:1 -t ossdsp hw:0

I hope this work...


All times are GMT -5. The time now is 04:09 AM.