LinuxQuestions.org
Visit Jeremy's Blog.
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
 
LinkBack Search this Thread
Old 06-05-2005, 07:49 PM   #1
bruno buys
Senior Member
 
Registered: Sep 2003
Location: Rio
Distribution: Debian
Posts: 1,509

Rep: Reputation: 46
Can't record video/sound from bttv input, maybe alsa/via8233 related...


I was trying to record video and audio from my bttv card. The video part is easy, just like the bttv howto says, but the audio part is really confusing.
The question is: what devices and modules shall I have and how to config them?

This is what I have found so far:

Using the cli program 'streamer', I could be able to do some recordings, but the best sound I got was that famous crackling noises from the wrong alsa channel. I can experience the same noises when using xmms's Configure options for alsa, and choose as audio device "HW:0,0". Choosing HW:0,1 sounds ok, and that's how I always use.
Reading the bttv howto, I used this command to see what devices I have

cat /proc/asound/pcm
00-00: VIA 823x rev60 : VIA 823x rev60 : playback 4 : capture 1
00-01: VIA 823x rev60 : VIA 823x rev60 : playback 1 : capture 1

And it seems the first is responsible for the bad sound? By the way, why does the card appear as two, in the first place?
I am trying to figure this right, and maybe find a way to prevent this device from registering in the kernel.

I have an abit kv7 motherboard with a via823x rev60 onboard sound (the chip is ICEnsemble VT1616i). The audio output of the tv card is pluged to the Aux in in the mobo. Through the external connections, I pluged the tv card's audio out to the sound card's line in (for testing).

The bttv driver loads and operates correctly with these params:

modprobe bttv card=37 tuner=2 radio=1

Other modules that appear to be related are:

btaudio - The bttv howto refers to it, but I don't see where it fits. I don't regularly use it.
bt878 - I also see no use. TV and rado works fine without it.
snd-bt87x - Alsa module. I have to prevent this from loading, otherwise I don't have the VIA device created.

Relevant modules:

bruno@frank:~$ lsmod |grep bttv
bttv 154252 0
video_buf 22212 1 bttv
i2c_algo_bit 9800 1 bttv
v4l2_common 6208 1 bttv
btcx_risc 4808 1 bttv
videodev 9984 1 bttv
soundcore 10400 3 bttv,snd
i2c_core 24144 8 tuner,bttv,i2c_algo_bit,w83627hf,eeprom,i2c_sensor,i2c_isa,i2c_viapro

bruno@frank:~$ lsmod |grep snd
snd_via82xx 29604 9
snd_ac97_codec 69508 1 snd_via82xx
snd_pcm_oss 54376 0
snd_mixer_oss 19904 2 snd_pcm_oss
snd_pcm 97480 2 snd_via82xx,snd_pcm_oss
snd_timer 25668 1 snd_pcm
snd_page_alloc 11720 2 snd_via82xx,snd_pcm
gameport 4736 1 snd_via82xx
snd_mpu401_uart 8000 1 snd_via82xx
snd_rawmidi 25316 1 snd_mpu401_uart
snd_seq_device 8264 1 snd_rawmidi
snd 57380 25 snd_via82xx,snd_ac97_codec,snd_pcm_oss,snd_mixer_oss,snd_pcm,snd_timer,snd_mpu401_uart,snd_rawmidi,s nd_seq_device
soundcore 10400 3 bttv,snd

Thanks, and sorry for the long and confusing post!

Last edited by bruno buys; 06-05-2005 at 07:52 PM.
 
Old 06-06-2005, 12:58 PM   #2
Ekkume
Member
 
Registered: Mar 2005
Location: Finland
Distribution: Debian Sid, FreeBSD, Mandrake, Red Hat
Posts: 84

Rep: Reputation: 15
I've got Ubuntu Hoary running and I have a Pinnacle PCTV Pro card,
which uses the same chipset. I use Xawtv to watch and record, which
it does fine. I record uncompressed avi and compress it into divx using
acidrip.

I have also managed to record some with vcr, but the results have not
always been usable. (lip sync problems)

The same card running in Mandrake 10.1 caused the same PC to reboot.

The kernel I have is 2.6.10, which may have something to do with it.

If there are any configurations or outputs you want me to paste here,
just let me know. Here is lspci:

0000:00:00.0 Host bridge: VIA Technologies, Inc. VT8377 [KT400/KT600 AGP] Host Bridge (rev 80)
0000:00:01.0 PCI bridge: VIA Technologies, Inc. VT8237 PCI Bridge
0000:00:0a.0 FireWire (IEEE 1394): VIA Technologies, Inc. IEEE 1394 Host Controller (rev 46)
0000:00:0b.0 Multimedia video controller: Brooktree Corporation Bt878 Video Capture (rev 11)
0000:00:0b.1 Multimedia controller: Brooktree Corporation Bt878 Audio Capture (rev 11)
0000:00:0f.0 IDE interface: VIA Technologies, Inc. VIA VT6420 SATA RAID Controller (rev 80)
0000:00:0f.1 IDE interface: VIA Technologies, Inc. VT82C586A/B/VT82C686/A/B/VT823x/A/C PIPC Bus Master IDE (rev 06)
0000:00:10.0 USB Controller: VIA Technologies, Inc. VT82xxxxx UHCI USB 1.1 Controller (rev 81)
0000:00:10.1 USB Controller: VIA Technologies, Inc. VT82xxxxx UHCI USB 1.1 Controller (rev 81)
0000:00:10.2 USB Controller: VIA Technologies, Inc. VT82xxxxx UHCI USB 1.1 Controller (rev 81)
0000:00:10.3 USB Controller: VIA Technologies, Inc. VT82xxxxx UHCI USB 1.1 Controller (rev 81)
0000:00:10.4 USB Controller: VIA Technologies, Inc. USB 2.0 (rev 86)
0000:00:11.0 ISA bridge: VIA Technologies, Inc. VT8237 ISA bridge [K8T800 South]
0000:00:11.5 Multimedia audio controller: VIA Technologies, Inc. VT8233/A/8235/8237 AC97 Audio Controller (rev 60)
0000:00:12.0 Ethernet controller: VIA Technologies, Inc. VT6102 [Rhine-II] (rev 78)
0000:01:00.0 VGA compatible controller: ATI Technologies Inc RV280 [Radeon 9200 PRO] (rev 01)
0000:01:00.1 Display controller: ATI Technologies Inc: Unknown device 5940 (rev 01)

and lsmod:
Module Size Used by
nls_cp437 5888 2
isofs 33720 2
udf 77060 0
proc_intf 4100 0
freq_table 4100 0
cpufreq_userspace 4572 0
cpufreq_ondemand 6172 0
cpufreq_powersave 1920 0
radeon 69760 1
drm 59412 2 radeon
video 16260 0
sony_acpi 6280 0
pcc_acpi 11264 0
button 6800 0
battery 10244 0
container 4608 0
ac 4996 0
sg 35360 0
sr_mod 16036 1
ipv6 229504 9
af_packet 20744 2
via_rhine 19972 0
mii 4736 1 via_rhine
snd_via82xx 25248 2
snd_ac97_codec 64608 1 snd_via82xx
gameport 4608 1 snd_via82xx
snd_mpu401_uart 7168 1 snd_via82xx
snd_rawmidi 22944 1 snd_mpu401_uart
snd_seq_device 8332 1 snd_rawmidi
i2c_viapro 7436 0
usb_storage 64064 1
ehci_hcd 29444 0
uhci_hcd 30224 0
usbcore 107384 4 usb_storage,ehci_hcd,uhci_hcd
sata_via 8196 0
libata 44548 1 sata_via
snd_bt87x 12612 0
snd_pcm_oss 47652 1
snd_mixer_oss 16768 2 snd_pcm_oss
snd_pcm 84872 4 snd_via82xx,snd_ac97_codec,snd_bt87x,snd_pcm_oss
snd_timer 23300 1 snd_pcm
snd 50276 10 snd_via82xx,snd_ac97_codec,snd_mpu401_uart,snd_rawmidi,snd_seq_device,snd_bt87x,snd_pcm_oss,snd_mixe r_oss,snd_pcm,snd_timer
soundcore 9824 3 snd
snd_page_alloc 9604 3 snd_via82xx,snd_bt87x,snd_pcm
tuner 20388 0
tda9887 13208 0
msp3400 23976 0
bttv 142928 0
video_buf 20484 1 bttv
firmware_class 9728 1 bttv
i2c_algo_bit 9224 1 bttv
v4l2_common 5888 1 bttv
btcx_risc 4744 1 bttv
i2c_core 21264 6 i2c_viapro,tuner,tda9887,msp3400,bttv,i2c_algo_bit
videodev 9728 1 bttv
ohci1394 31876 0
pci_hotplug 30512 0
via_agp 9216 1
evdev 9088 0
commoncap 7808 1 capability
tsdev 7488 0
sbp2 22408 0
parport_pc 34372 1
lp 10792 0
parport 33480 2 parport_pc,lp
ide_cd 38532 1
via82cxxx 12956 1

cat /proc/asound/pcm
00-00: VIA 8237 : VIA 8237 : playback 4 : capture 1
00-01: VIA 8237 : VIA 8237 : playback 1 : capture 1
01-00: Bt87x Digital : Bt87x Digital : capture 1
01-01: Bt87x Analog : Bt87x Analog : capture 1
 
Old 06-06-2005, 07:34 PM   #3
bruno buys
Senior Member
 
Registered: Sep 2003
Location: Rio
Distribution: Debian
Posts: 1,509

Original Poster
Rep: Reputation: 46
Hi friend, thanks!

The output of your cat /proc... is interesting. I could manage to have those bttv devices registered, but it seems there's some kind of conflict between them and the alsa modules. Whichever loads first will prevent the other from being created.

Anyway, apparently I managed to correct the situation. The thing was to map the input from the correct mixer source to the recording. The alsa sound is inexplicably ok. So, I made my first recordings today.

I still have much to learn from drivers and devices...
 
Old 06-13-2005, 01:32 AM   #4
herbivoro
LQ Newbie
 
Registered: Apr 2005
Location: chile
Posts: 7

Rep: Reputation: 0
hi

i'm trying to record with:
streamer -p 4 -t 1:00 -r 24 -q -o test.avi -j 90 -f mjpeg -F mono16

when is creating the .avi i can hear the soud of the channel but when i play the file is my problem
because .... there's no sound recorded!!!

thnx
 
Old 06-13-2005, 11:55 AM   #5
bruno buys
Senior Member
 
Registered: Sep 2003
Location: Rio
Distribution: Debian
Posts: 1,509

Original Poster
Rep: Reputation: 46
Did you try stereo? Open your mixer and try playing with the channels. It worked for me.
 
Old 06-13-2005, 06:35 PM   #6
herbivoro
LQ Newbie
 
Registered: Apr 2005
Location: chile
Posts: 7

Rep: Reputation: 0
the sound is not recorded

with:
streamer -p 4 -t 1:00 -r 24 -q -o test.avi -j 90 -f mjpeg -F stereo

i have the same result
the video is recorded with no sound

but I Don't Understand why i can hear the sound when the video is recorded
but no in the avi file

i have a sound blaster live and a pinnacle studio pro working
the sound out (pinnacle card) is connected to the aux (audio card) directly

thnxs


( sorry but i don't speak english very well :P )
 
Old 06-13-2005, 07:05 PM   #7
Electro
Guru
 
Registered: Jan 2002
Posts: 6,042

Rep: Reputation: Disabled
You have to use your sound card to record audio from video capture cards.

You have to do
streamer -p 4 -t 1:00 -r 24 -q -o test.avi -j 90 -f mjpeg -F stereo -a -c /dev/video0 -C /dev/dsp0

The above is just an example so for -c and -C find the correct device. Make sure AUX is unmuted and any ADC or AC97 is adjusted and unmuted. If you still get no sound, run arecord -vv -f cd -t wav soundtest.wav or arecord -vv -f cd -t wav /dev/null. While it is recording you will see a VU meter. Adjust settings using alsamixer while it is recording. You can use Audacity but with some sound cards you have to use aumix to adjust some controls which creates extra steps.

Use mencoder. It is more flexible than streamer.
 
Old 06-14-2005, 03:57 PM   #8
herbivoro
LQ Newbie
 
Registered: Apr 2005
Location: chile
Posts: 7

Rep: Reputation: 0
Unhappy now what??

now the situation is worse than before

~$ dmesg
read 0x10/0x200)
msp34xx: giving up, reseting chip. Sound will go off, sorry folks :-|
msp3400: chip reset failed
msp34xx: I/O error #1 (write 0x12/0x06)
msp34xx: I/O error #2 (read 0x10/0x200)
msp34xx: I/O error #2 (write 0x12/0x06)
msp34xx: I/O error #3 (read 0x10/0x200)
msp34xx: I/O error #3 (write 0x12/0x06)
msp34xx: giving up, reseting chip. Sound will go off, sorry folks :-|
msp3400: chip reset failed
msp34xx: giving up, reseting chip. Sound will go off, sorry folks :-|
msp3400: chip reset failed
msp34xx: I/O error #1 (write 0x12/0x07)
msp34xx: I/O error #2 (write 0x12/0x07)
msp34xx: I/O error #1 (read 0x10/0x200)
msp34xx: I/O error #3 (write 0x12/0x07)
msp34xx: I/O error #2 (read 0x10/0x200)
msp34xx: giving up, reseting chip. Sound will go off, sorry folks :-|
msp3400: chip reset failed
msp34xx: I/O error #1 (write 0x12/0x01)
msp34xx: I/O error #3 (read 0x10/0x200)
msp34xx: I/O error #2 (write 0x12/0x01)
msp34xx: giving up, reseting chip. Sound will go off, sorry folks :-|
msp3400: chip reset failed

i must reboot if i want to watch the tv
 
Old 06-14-2005, 08:36 PM   #9
herbivoro
LQ Newbie
 
Registered: Apr 2005
Location: chile
Posts: 7

Rep: Reputation: 0
my system

now my problem is :
1 i cant record sound on video
2 i was listening music and after i try to watch tv and din't work( the dmesg posted )

my sistem:

$ dmesg | grep btt

bttv: driver version 0.9.15 loaded
bttv: using 8 buffers with 2080k (520 pages) each for capture
bttv: Bt8xx card found (0).
bttv0: Bt878 (rev 17) at 0000:01:0a.0, irq: 177, latency: 32, mmio: 0xdc000000
bttv0: detected: Pinnacle PCTV [bswap] [card=39], PCI subsystem ID is bd11:1200
bttv0: using: Pinnacle PCTV Studio/Rave [card=39,insmod option]
bttv0: gpio: en=00000000, out=00000000 in=00ff4fdf [init]
bttv0: i2c: checking for MSP34xx @ 0x80... not found
bttv0: miro: id=19 tuner=17 radio=fmtuner stereo=no
bttv0: using tuner=17
bttv0: i2c: checking for MSP34xx @ 0x80... not found
bttv0: i2c: checking for TDA9875 @ 0xb0... not found
bttv0: i2c: checking for TDA7432 @ 0x8a... not found
bttv0: i2c: checking for TDA9887 @ 0x86... not found
bttv0: registered device video0
bttv0: registered device vbi0
bttv0: registered device radio0
bttv0: PLL: 28636363 => 35468950 .. ok
bttv0: PLL can sleep, using XTAL (28636363).

bttv module options: (with modconf)
tuner=17 card=39 radio=1 automute=0
...but this is strange:
$ cat /proc/asound/pcm
00-00: emu10k1 : EMU10K1 : playback 32 : capture 1
00-01: emu10k1 mic : EMU10K1 MIC : capture 1
00-02: emu10k1 efx : EMU10K1 EFX : playback 8 : capture 1

$ lspci
0000:00:00.0 Host bridge: nVidia Corporation nForce2 AGP (different version?) (rev c1)
0000:00:00.1 RAM memory: nVidia Corporation nForce2 Memory Controller 1 (rev c1)
0000:00:00.2 RAM memory: nVidia Corporation nForce2 Memory Controller 4 (rev c1)
0000:00:00.3 RAM memory: nVidia Corporation nForce2 Memory Controller 3 (rev c1)
0000:00:00.4 RAM memory: nVidia Corporation nForce2 Memory Controller 2 (rev c1)
0000:00:00.5 RAM memory: nVidia Corporation nForce2 Memory Controller 5 (rev c1)
0000:00:01.0 ISA bridge: nVidia Corporation nForce2 ISA Bridge (rev a3)
0000:00:01.1 SMBus: nVidia Corporation nForce2 SMBus (MCP) (rev a2)
0000:00:02.0 USB Controller: nVidia Corporation nForce2 USB Controller (rev a3)
0000:00:02.1 USB Controller: nVidia Corporation nForce2 USB Controller (rev a3)
0000:00:02.2 USB Controller: nVidia Corporation nForce2 USB Controller (rev a3)
0000:00:04.0 Ethernet controller: nVidia Corporation nForce2 Ethernet Controller (rev a1)
0000:00:08.0 PCI bridge: nVidia Corporation nForce2 External PCI Bridge (rev a3)
0000:00:09.0 IDE interface: nVidia Corporation nForce2 IDE (rev a2)
0000:00:1e.0 PCI bridge: nVidia Corporation nForce2 AGP (rev c1)
0000:01:08.0 Multimedia audio controller: Creative Labs SB Live! EMU10k1 (rev 08)
0000:01:08.1 Input device controller: Creative Labs SB Live! MIDI/Game Port (rev 08)
0000:01:0a.0 Multimedia video controller: Brooktree Corporation Bt878 Video Capture (rev 11)
0000:01:0a.1 Multimedia controller: Brooktree Corporation Bt878 Audio Capture (rev 11)
0000:02:00.0 VGA compatible controller: nVidia Corporation NV11 [GeForce2 MX/MX 400] (rev b2)

i don't have more details
 
Old 06-14-2005, 11:31 PM   #10
Electro
Guru
 
Registered: Jan 2002
Posts: 6,042

Rep: Reputation: Disabled
Why do I have to be more specific?

Not all video captures outputs PCM, so you have use the loopback cable that connects from the video capture's output line to the sound card's input line. Also you have find out which /dev/dsp device is your sound card. I suggest adding options snd-emu10k1 index=0 in /etc/modules.conf for 2.4.x kernels or /etc/modprobe.conf for 2.6.x kernels. This will make sure the desire sound card is first and does not matter if other cards loaded first.. I suggest "bruno buys" doing the same too, but change snd-emu10k1 to snd-via82xx.

Use xawtv, tvtime, or mplayer to activate the video capture device. Then start recording audio. While you are recording sound (no video), use alsamixer to adjust the volumes like I said earlier. Soundblaster LIVE cards are pain in the ass and POS for recording audio. I suggest something easier like the Turtle Beach Santa Cruz or Audiotrak Prodigy 7.1.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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
Trackbacks are Off
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
NO Sound (ALSA 1.07) -- Utilizing the VIA8233.conf barton Linux - Hardware 4 12-24-2004 05:04 PM
bttv has no input benjalien Linux - Hardware 0 11-25-2003 05:20 PM
pixelview 878P+ rev 9d tv card, bttv can't record sound mikeybsae Linux - Hardware 0 10-15-2003 10:18 PM
bttv-0.9.11 PV878P+ (rev9d) can't record sound mikeybsae Linux - Software 0 10-15-2003 10:03 PM
Slackware, AC97 onboard, VIA8233 - can't install ALSA - help please zerillos Slackware 5 07-15-2003 07:16 AM


All times are GMT -5. The time now is 02:20 AM.

Main Menu
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
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration