LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Hardware
User Name
Password
Linux - Hardware This forum is for Hardware issues.
Having trouble installing a piece of hardware? Want to know if that peripheral is compatible with Linux?

Notices


Reply
  Search this Thread
Old 10-03-2006, 08:22 AM   #1
Kropotkin
Member
 
Registered: Oct 2004
Location: /usr/home
Distribution: Mint, Ubuntu server, FreeBSD, Android
Posts: 362

Rep: Reputation: 32
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.
 
Old 10-04-2006, 02:38 AM   #2
Electro
LQ Guru
 
Registered: Jan 2002
Posts: 6,042

Rep: Reputation: Disabled
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.
 
Old 11-29-2006, 06:10 PM   #3
Kropotkin
Member
 
Registered: Oct 2004
Location: /usr/home
Distribution: Mint, Ubuntu server, FreeBSD, Android
Posts: 362

Original Poster
Rep: Reputation: 32
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.
 
Old 04-29-2009, 12:17 AM   #4
Zoutmax
LQ Newbie
 
Registered: Apr 2009
Posts: 5
Blog Entries: 1

Rep: Reputation: 0
Question maybe a fix

Quote:
Originally Posted by Kropotkin View Post
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...
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
getting both video & audio from saa7133 tv card to divx file Kropotkin Linux - Hardware 1 08-17-2006 12:37 PM
[TV]no signal in saa7133 sathia Linux - Hardware 3 03-02-2005 01:54 AM
application sox uses obsolete OSS audio interface awt586 Fedora 2 01-12-2005 12:08 PM
Flyvideo SAA7133/4 not work on FC2 danilodal Fedora 0 06-04-2004 07:26 AM
Phillips SAA7133/7134 card wont work arimus25 Mandriva 2 04-02-2004 10:03 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Hardware

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

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration