[alsa-devel] X-Fi Titanium: Capture is possible only with unmuted input

Thor Kristoffersen thorkr at gmail.com
Mon Aug 30 19:22:35 CEST 2010


Takashi Iwai <tiwai at suse.de> writes:
> At Mon, 30 Aug 2010 11:18:01 +0200,
> Thor Kristoffersen wrote:
>> 
>> On Mon, Aug 30, 2010 at 11:07 AM, Takashi Iwai <tiwai at suse.de> wrote:
>> >> On Mon, Aug 30, 2010 at 10:46 AM, Takashi Iwai <tiwai at suse.de> wrote:
>> >> >> >> I'm having issues with an X-Fi Titanium and ALSA.  The problem is that
>> >> >> >> it appears to be impossible to capture without unmuting the channel I'm
>> >> >> >> capturing from.
>> >> >> >
>> >> >> > What do you mean exactly "unmuting the channel I'm capturing from"?
>> >> >> > If you mean to turn on/off "XXX Capture Switch", then it's a feature,
>> >> >> > no bug.
>> >> >>
>> >> >> No, I mean that capture is possible only when mute=off and capture=on.
>> >> >
>> >> > Which mute?  Please be more specific.
>> >>
>> >> The signal I'm trying to capture is coming in through the SPDIF-i
>> >> channel, so I'm talking about the mute and capture flags on that
>> >> channel. However, I also tried the analog input (line), and the
>> >> problem is exactly the same on that channel.
>> >
>> > Well, this is still unclear (what actually do you mean "channel") but
>> > let me guess:
>> >
>> >  the recording from either mic or line-in doesn't work unless you unmute
>> >  via "Front Playback Switch" mixer element.
>> >
>> > Correct?
>> 
>> Not really. I use gnome-alsamixer, and there is a mixer element called
>> "SPDIF-i" that has a slider, a "Mute" switch, and a "Capture" switch.
>> I connect a digital source to the SPDIF input on the card, and then I
>> try to record it with arecord from device hw:0,0. The only way I'm
>> able to record sound is by setting the Mute switch (of the SPDIF-i
>> mixer element) to off and the Capture switch to on.
>
> There is no mixer switch names "SPDIF-i".  It's cut in alsamixer's
> display.

I'm not sure I understand what you mean.  There is definitely a mixer
element called "S/PDIF-in".  It is present in gnome-alsamixer,
alsamixer, and amixer (though in gnome-alsamixer the text says
"S/PDIF-i").  This is what the element looks like in the amixer output:

Simple mixer control 'S/PDIF-in',0
  Capabilities: pvolume cvolume pswitch pswitch-joined cswitch cswitch-joined penum
  Playback channels: Front Left - Front Right
  Capture channels: Front Left - Front Right
  Limits: Playback 0 - 256 Capture 0 - 256
  Front Left: Playback 256 [100%] [0.00dB] [off] Capture 256 [100%] [0.00dB] [on]
  Front Right: Playback 256 [100%] [0.00dB] [off] Capture 256 [100%] [0.00dB] [on]

> To check more exactly, make a diff of amixer outputs between
> working and non-working states.

Ok, here's a transcript of the test that reproduces the issue.  First I
send in a digital stream on the S/PDIF input on the sound card.  Then I
set the "S/PDIF-in" mixer control to volume=100%, mute=on, capture=on.
Then I issue the following commands.

[calvin:~]amixer > capture-not-working.txt
[calvin:~]arecord -D hw:0,0 -c 2 -f S16_LE -r 96000 -d 5 sndtest1.wav
Recording WAVE 'sndtest1.wav' : Signed 16 bit Little Endian, Rate 96000 Hz, Stereo
[calvin:~]aplay -D hw:0,0 sndtest1.wav 
Playing WAVE 'sndtest1.wav' : Signed 16 bit Little Endian, Rate 96000 Hz, Stereo

No sound is played.  Now I change the "S/PDIF-in" mixer control to mute=off.
Then I issue the following commands.

[calvin:~]amixer > capture-working.txt
[calvin:~]arecord -D hw:0,0 -c 2 -f S16_LE -r 96000 -d 5 sndtest1.wav
Recording WAVE 'sndtest1.wav' : Signed 16 bit Little Endian, Rate 96000 Hz, Stereo
[calvin:~]aplay -D hw:0,0 sndtest1.wav 
Playing WAVE 'sndtest1.wav' : Signed 16 bit Little Endian, Rate 96000 Hz, Stereo

Sound plays just fine.  This is the diff between the non-working and
working states:

[calvin:~]diff -u capture-not-working.txt capture-working.txt 
--- capture-not-working.txt     2010-08-30 19:01:02.344319762 +0200
+++ capture-working.txt 2010-08-30 19:01:46.964945361 +0200
@@ -59,8 +59,8 @@
   Playback channels: Front Left - Front Right
   Capture channels: Front Left - Front Right
   Limits: Playback 0 - 256 Capture 0 - 256
-  Front Left: Playback 256 [100%] [0.00dB] [off] Capture 256 [100%] [0.00dB] [on]
-  Front Right: Playback 256 [100%] [0.00dB] [off] Capture 256 [100%] [0.00dB] [on]
+  Front Left: Playback 256 [100%] [0.00dB] [on] Capture 256 [100%] [0.00dB] [on]
+  Front Right: Playback 256 [100%] [0.00dB] [on] Capture 256 [100%] [0.00dB] [on]
 Simple mixer control 'S/PDIF-out',0
   Capabilities: pvolume pswitch pswitch-joined penum
   Playback channels: Front Left - Front Right

Please let me know if there are any other tests you want me to perform.

Thor


More information about the Alsa-devel mailing list