View previous topic :: View next topic |
Author |
Message |
TopherC n00b
Joined: 29 Oct 2003 Posts: 47 Location: Cornell University
|
Posted: Wed Jan 04, 2006 10:48 pm Post subject: Only getting left channel (mono) in recordings [solved] |
|
|
I have been trying to get sound working for mythtv and FM recordings, but I can only get (poor quality) sound in the left channel. I have an MSI K8N motherboard with an nvidia CK804 audio controller. I'm using snd_intel8x0 in the 2.6.14 gentoo kernel. I have a WinTV card with audio plugged into the Aux input. Using tvtime or gnomeradio or whatever, I can get a good live stereo audio signal mixed and out my speakers. But I can't record the audio -- at least not in stereo. I can play pack sound in stereo from other sources, so the digital playback path is not completely bad.
Actually I get no sound recorded at all if I select Aux as a recording source. I also have to select "capture" and boost its volume. I don't know if that's bad or not.
To narrow down the problems, I've used ecasound:
Code: | $ ecasound -i:alsa -o:alsa
...
(eca-chainsetup) 'rtlowlatency' buffering mode selected.
(audioio_alsa) Warning! Period-size differs from current client buffersize.
(eca-chainsetup) Audio object "alsa", mode "read".
(audio-io) Format: s16_le, channels 2, srate 44100, interleaved.
(audioio_alsa) Warning! Period-size differs from current client buffersize.
(eca-chainsetup) Audio object "alsa", mode "write".
(audio-io) Format: s16_le, channels 2, srate 44100, interleaved.
... |
I also get playback underrun warnings with this as well -- eliminated if I use the OSS interface with "-o /dev/dsp" instead. Regardless, every variation I try of this has somewhat poor-sounding audio in the left channel and nothing in the right. Live TV in mythtv gives me the same behavior.
What really makes me tearful is that I had nearly this same exact problem with an entirely different computer and different sound card! Left channel only, but in that case the volume was low as well. I was using an SB Live card then (set up much the same way but my current troubles come from a fresh Gentoo install) and I found that to get decent recordings I had to use an OSS driver. I don't think OSS supports the CK804 device though, so I can't try OSS this time. The only thing the same about these computers is that the same idiot (me) installed Gentoo on them.
I'm not sure what else to post here -- perhaps this:
Code: |
/etc/modules.d/alsa:
# ALSA portion
alias char-major-116 snd
# OSS/Free portion
alias char-major-14 soundcore
##
## IMPORTANT:
## You need to customise this section for your specific sound card(s)
## and then run `update-modules' command.
## Read alsa-driver's INSTALL file in /usr/share/doc for more info.
##
## ALSA portion
alias snd-card-0 snd-intel8x0
## OSS/Free portion
alias sound-slot-0 snd-card-0
##
# OSS/Free portion - card #1
alias sound-service-0-0 snd-mixer-oss
alias sound-service-0-1 snd-seq-oss
alias sound-service-0-3 snd-pcm-oss
alias sound-service-0-8 snd-seq-oss
alias sound-service-0-12 snd-pcm-oss
alias /dev/mixer snd-mixer-oss
alias /dev/dsp snd-pcm-oss
alias /dev/midi snd-seq-oss
# Set this to the correct number of cards.
options snd cards_limit=1
|
Last edited by TopherC on Tue Jan 24, 2006 5:30 pm; edited 1 time in total |
|
Back to top |
|
|
frostschutz Advocate
Joined: 22 Feb 2005 Posts: 2977 Location: Germany
|
Posted: Thu Jan 05, 2006 12:04 am Post subject: |
|
|
Using an onboard sound card for recording might not be a good idea.
That said, as long as you get proper audio output somewhere, for example in mplayer, you should be able to record it.
Example for mplayer:
Code: | mkfifo pcm_audio
mplayer -ao pcm:file=pcm_audio whatever
(and while mplayer is running in the background, you can encode the pcm data to ogg or mp3 e.g.)
oggenc -q 3 -o pcm_audio.ogg pcm_audio |
However, please notice that this way you are probably re-encoding stuff. For avi files and similar, it's better to dump the audio source / extract the audio track directly from the file. |
|
Back to top |
|
|
labba Apprentice
Joined: 01 Oct 2004 Posts: 178 Location: 127.0.0.1
|
Posted: Wed Jan 11, 2006 12:24 am Post subject: |
|
|
I've got the same problem.
Already tried to delete my asound.sate like frostschutz proposed in this thread, but that didn't help. I'm using a SoundBlaster Live! Card... |
|
Back to top |
|
|
ximon n00b
Joined: 31 Aug 2003 Posts: 4 Location: East Yorkshire, UK
|
Posted: Thu Jan 12, 2006 8:29 pm Post subject: |
|
|
Hi, I had the exact same problem, seemingly only able to record from one channel from line input. To cut a long story short I found that the settings from amixer contents for the capture source showed values of 4,0 where 4 is the line in device from the list of sources. Setting this value to 4,4 using amixer cset solved the issue. I guess that capture can be enabled for different sources on each channel but alsamixer doesn't seem to have this capability - I don't know about other mixers.
HTH. |
|
Back to top |
|
|
labba Apprentice
Joined: 01 Oct 2004 Posts: 178 Location: 127.0.0.1
|
Posted: Thu Jan 12, 2006 8:52 pm Post subject: |
|
|
Hi ximon!
Capture is set to 3,3 on my system... Problem still exists... |
|
Back to top |
|
|
ximon n00b
Joined: 31 Aug 2003 Posts: 4 Location: East Yorkshire, UK
|
Posted: Thu Jan 12, 2006 9:27 pm Post subject: |
|
|
Hi Labba,
Rats, I was hoping it would be the answer
I have two soundcards - one onboard the other pci and they both had the same issue. On a different box with alsa 1.0.8 there was no problem - I was about to downgrade this box. I am using the kernel drivers as modules and alsa-lib/headers/utils1.0.10 from a fresh build today. The problem still persisted with line-in capture on one channel only and then I stumbled over the amixer settings for capture source and the problem was solved.
I haven't a soundblaster card so can't help you there.
Capture source 3,3 corresponds to the input you require? and can you listen to the capture source from the sound card output? |
|
Back to top |
|
|
labba Apprentice
Joined: 01 Oct 2004 Posts: 178 Location: 127.0.0.1
|
Posted: Thu Jan 12, 2006 9:35 pm Post subject: |
|
|
Hi!
Thanks for the tip anyway
Yes, the capture source is correct and sound is wonderful if I listen to it... Just when I try to record from line in, only the left channel with poor quality is recorded. I will try to upgrade alsa and the kernel, maybe that helps... |
|
Back to top |
|
|
TopherC n00b
Joined: 29 Oct 2003 Posts: 47 Location: Cornell University
|
Posted: Tue Jan 17, 2006 8:43 pm Post subject: |
|
|
I'm just checking back in on this thread. I've tried ximon's solution as well, but without success.
Today I tried recording audio from the CD input of my laptop. This is an entirely different computer, but also running gentoo of course. I'm using the snd-intel8x0 driver as in my original post, but the hardware/chipset is different. Interestingly enough, I get the exact same problem! Currently I'm 0/3 using alsa drivers to record sound -- on every computer I only get the left channel. If I crank up the capture volume then I get some feedback and static in the right channel, but music only in the left channel.
Does anyone else have this problem? I can test this in several ways, including ecasound (mentioned above) or:
Code: | arecord -f dat - | aplay - |
No matter what I do, I hear the left channel only. I've tried using amixer, alsamixer, alsamixergui, and kmix. These produce the same results (though alsamixergui seems unstable). |
|
Back to top |
|
|
TopherC n00b
Joined: 29 Oct 2003 Posts: 47 Location: Cornell University
|
Posted: Tue Jan 24, 2006 5:30 pm Post subject: Only getting left channel (mono) in recordings [solved] |
|
|
I poked around some more, and finally fixed the problem!
Apparently this was a known bug in the alsa libraries, broken in 1.0.10, and was fixed in 1.0.11_rc2. I fixed it with:
Code: |
# echo 'media-sound/alsa-headers ~x86' >> /etc/portage/package.keywords
# echo 'media-libs/alsa-lib ~x86' >> /etc/portage/package.keywords
# emerge -av alsa-lib
|
(I used ~amd64 instead of ~x86 but the alsa-lib versions are the same for both architectures as of now.)
This is bug 1658 in the alsa bug tracking system: http://bugtrack.alsa-project.org/alsa-bug/view.php?id=1658 (you need to log in as guest first) |
|
Back to top |
|
|
jbinto n00b
Joined: 21 Aug 2005 Posts: 74
|
Posted: Sat Feb 25, 2006 6:11 pm Post subject: |
|
|
Yes! Thank you for this resolution, I was about to give up with this sound card in Linux. Emerge'ing now, haven't tested it, but this sounds promising. I was certain I caused the problem (overlooking some obscurity in alsamixer perhaps). |
|
Back to top |
|
|
vguy85 n00b
Joined: 17 Mar 2006 Posts: 11
|
Posted: Fri Jul 21, 2006 2:10 am Post subject: |
|
|
Yeah, that fixed my problem too. Thanks guys, you rock!! |
|
Back to top |
|
|
|