[alsa-devel] Problems with ALC882
Hi,
I am having a bad time trying to get an ALC882 [1] to work. I hope that you can help me. Currently I am using alsa-driver-1.0.14 but it would probably be the same with 1.0.15 since there has been no change in /pci/hda/.
The ALC882 has got three ADC, and for every one of them it is possible to select one input source. amixer shows my current settings:
~# amixer get 'Input Source',0 Simple mixer control 'Input Source',0 Capabilities: enum Items: 'Mic' 'Front Mic' 'Line' 'CD' Item0: 'Mic' ~# amixer get 'Input Source',1 Simple mixer control 'Input Source',1 Capabilities: enum Items: 'Mic' 'Front Mic' 'Line' 'CD' Item0: 'Front Mic' ~# amixer get 'Input Source',2 Simple mixer control 'Input Source',2 Capabilities: enum Items: 'Mic' 'Front Mic' 'Line' 'CD' Item0: 'Line'
Put more simply:
Mic -> Input 0 (1st ADC) Front Mic -> Input 1 (2nd ADC) Line In -> Input 2 (3rd ADC)
A grep in the proc filesystem shows that there are three ADC and one digital input.
~# cat /proc/asound/card0/codec#2 | grep Input Node 0x07 [Audio Input] wcaps 0x10011b: Stereo Amp-In Node 0x08 [Audio Input] wcaps 0x10011b: Stereo Amp-In Node 0x09 [Audio Input] wcaps 0x10011b: Stereo Amp-In Node 0x0a [Audio Input] wcaps 0x100391: Stereo Digital
So far, so good. But then I try to use the PCM system and things start to go worse.
~# cat /proc/asound/pcm 00-02: ALC882 Analog : ALC882 Analog : capture 2 00-01: ALC882 Digital : ALC882 Digital : playback 1 : capture 1 00-00: ALC882 Analog : ALC882 Analog : playback 1 : capture 2
If my ALSA understanding is right, that means I have two analog input devices (hw:0,0 and hw:0,2). One is missing!
If I ask arecord to list the capture devices, it shows the following:
~# ./arecord -l **** List of CAPTURE Hardware Devices **** card 0: Intel [HDA Intel], device 0: ALC882 Analog [ALC882 Analog] Subdevices: 2/2 Subdevice #0: subdevice #0 Subdevice #1: subdevice #1 card 0: Intel [HDA Intel], device 1: ALC882 Digital [ALC882 Digital] Subdevices: 1/1 Subdevice #0: subdevice #0 card 0: Intel [HDA Intel], device 2: ALC882 Analog [ALC882 Analog] Subdevices: 2/2 Subdevice #0: subdevice #0 Subdevice #1: subdevice #1
I have tried to pipe arecord into aplay several times:
1) arecord -f dat -D hw:0,0,0 | aplay -f dat -D hw:0,0,0 2) arecord -f dat -D hw:0,0,1 | aplay -f dat -D hw:0,0,0 3) arecord -f dat -D hw:0,1,0 | aplay -f dat -D hw:0,0,0 (fails) 4) arecord -f dat -D hw:0,2,0 | aplay -f dat -D hw:0,0,0 5) arecord -f dat -D hw:0,2,1 | aplay -f dat -D hw:0,0,0 6) arecord -f dat -D hw:0,0,0 > /dev/null (fails) and arecord -f dat -D hw:0,2,0 > /dev/null (fails)
and it shows that:
1) hw:0,0,0 maps to 1st ADC: OK 2) hw:0,0,1 maps to 2nd ADC: OK 3) fails probably because digital input is not activated 4) hw:0,2,0 maps to 1st ADC (same as hw:0,0,0) 5) hw:0,2,1 maps to 2nd ADC (same as hw:0,0,1) 6) when I start the second arecord the first stops (I/O error) and then the second one stops (error), probably because they are working on the same ADC.
So it appears that while the "control" ALSA layer detects the 3 ADC the "PCM" layer does not. Do you have any idea of what could be wrong?
Besides that I have another smaller problem. According to the ALC882 documentation, the codec can handle 8 kHz signals (by sending setting only one packet on every six packets of the HDA bus which operates at 48 kHz). However the driver will not let me use that sample rate. Example from /proc:
Node 0x07 [Audio Input] wcaps 0x10011b: Stereo Amp-In Amp-In caps: ofs=0x08, nsteps=0x1f, stepsize=0x05, mute=1 Amp-In vals: [0x14 0x14] PCM: rates [0x160]: 44100 48000 96000 bits [0x6]: 16 20 formats [0x1]: PCM Connection: 1 0x24
Is this a limit of the HDA implementation?
Thanks for your help.
[1] http://www.realtek.com.tw/products/productsView.aspx?Langid=1&PFid=28&am...
At Wed, 16 Jan 2008 18:20:20 +0100, Christophe Osuna wrote:
Hi,
I am having a bad time trying to get an ALC882 [1] to work. I hope that you can help me. Currently I am using alsa-driver-1.0.14 but it would probably be the same with 1.0.15 since there has been no change in /pci/hda/.
There have been tons of changes for HD-audio between these versions :) You should have looked at alsa-driver*/alsa-kernel/pci/hda.
Anyway, now it's much better to try the latest ALSA HG version than 1.0.15. 1.0.15 is so old. If you are not familiar with HG, try the daily snapshot tarball below:
ftp://ftp.suse.com/pub/projects/alsa/snapshot/
Takashi
2008/1/16, Takashi Iwai tiwai@suse.de:
At Wed, 16 Jan 2008 18:20:20 +0100, Christophe Osuna wrote:
I am having a bad time trying to get an ALC882 [1] to work. I hope that you can help me. Currently I am using alsa-driver-1.0.14 but it would probably be the same with 1.0.15 since there has been no change in /pci/hda/.
There have been tons of changes for HD-audio between these versions :) You should have looked at alsa-driver*/alsa-kernel/pci/hda.
Anyway, now it's much better to try the latest ALSA HG version than 1.0.15. 1.0.15 is so old. If you are not familiar with HG, try the daily snapshot tarball below:
ftp://ftp.suse.com/pub/projects/alsa/snapshot/
I have tried alsa-driver-hg20080117; it shows two additional mixer options (Mic Boost and Front Mic Boost) but in the end it's the same: I am unable to access the 3rd ADC.
~# cat /proc/asound/version Advanced Linux Sound Architecture Driver Version 1.0.15. Compiled on Jan 18 2008 for kernel 2.6.23.14-soos (SMP). ~# cat /proc/asound/devices 0: [ 0] : control 6: [ 0- 2]: hardware dependent 16: [ 0- 0]: digital audio playback 17: [ 0- 1]: digital audio playback 24: [ 0- 0]: digital audio capture 25: [ 0- 1]: digital audio capture 26: [ 0- 2]: digital audio capture 33: : timer ~# cat /proc/asound/pcm 00-02: ALC882 Analog : ALC882 Analog : capture 2 00-01: ALC882 Digital : ALC882 Digital : playback 1 : capture 1 00-00: ALC882 Analog : ALC882 Analog : playback 1 : capture 2 ~# arecord -l **** List of CAPTURE Hardware Devices **** card 0: Intel [HDA Intel], device 0: ALC882 Analog [ALC882 Analog] Subdevices: 2/2 Subdevice #0: subdevice #0 Subdevice #1: subdevice #1 card 0: Intel [HDA Intel], device 1: ALC882 Digital [ALC882 Digital] Subdevices: 1/1 Subdevice #0: subdevice #0 card 0: Intel [HDA Intel], device 2: ALC882 Analog [ALC882 Analog] Subdevices: 2/2 Subdevice #0: subdevice #0 Subdevice #1: subdevice #1
When I start two instances of arecord to pipe hw:0,0,0 and hw:0,2,0 to /dev/null, both stop because of I/O error.
The ALC882 datasheet states that "3 stereo ADCs support 16/20-bit PCM format, two for microphone array, one for legacy mixer recording". This is the only place that suggests there could be a difference, but I do not understand this sentence as "only 2 ADC can be used at a time" (English is not my native language). The block diagram in the following page does not suggest such a limit either.
Besides that I have read in the same datasheet that "rates in sub-multiples (1/n) of 48kHz are interleaving n frames containing no sample blocks" and so we can have 8 kHz by setting one sample block every six frames. Still, I can't set the device to 8 kHz.
Here is a summary of my questions: 1) Why is the 3rd ADC missing from PCM (the mixer does show it)? 2) If that is a bug, where should I look first? (However, because of my very limited experience I am not very confident in fixing that myself) 3) Is it possible to use two ALC882 driven by the same HDA? 4) In that case, how will I be able to access the second ALC882 (hw:0,x,y)? 5) Still in that case, will I be able to use snd_pcm_link() for all devices? 6) Would you know any ALSA-supported card with three ADC? 7) Does HDA really support 8 kHz? 8) If it does, will ALSA support it?
Thanks for your help.
At Fri, 18 Jan 2008 17:10:06 +0100, Christophe Osuna wrote:
2008/1/16, Takashi Iwai tiwai@suse.de:
At Wed, 16 Jan 2008 18:20:20 +0100, Christophe Osuna wrote:
I am having a bad time trying to get an ALC882 [1] to work. I hope that you can help me. Currently I am using alsa-driver-1.0.14 but it would probably be the same with 1.0.15 since there has been no change in /pci/hda/.
There have been tons of changes for HD-audio between these versions :) You should have looked at alsa-driver*/alsa-kernel/pci/hda.
Anyway, now it's much better to try the latest ALSA HG version than 1.0.15. 1.0.15 is so old. If you are not familiar with HG, try the daily snapshot tarball below:
ftp://ftp.suse.com/pub/projects/alsa/snapshot/
I have tried alsa-driver-hg20080117; it shows two additional mixer options (Mic Boost and Front Mic Boost) but in the end it's the same: I am unable to access the 3rd ADC.
Looks like your board disables the third ADC. The driver probes it and the codec returns it's no audio-input widget. Check codec#* proc output.
The ALC882 datasheet states that "3 stereo ADCs support 16/20-bit PCM format, two for microphone array, one for legacy mixer recording". This is the only place that suggests there could be a difference, but I do not understand this sentence as "only 2 ADC can be used at a time" (English is not my native language). The block diagram in the following page does not suggest such a limit either.
The reality bites sometimes :)
Besides that I have read in the same datasheet that "rates in sub-multiples (1/n) of 48kHz are interleaving n frames containing no sample blocks" and so we can have 8 kHz by setting one sample block every six frames. Still, I can't set the device to 8 kHz.
How did you test it? The driver itself supports 8kHz, as long as the codec chip really returns the capability.
Using two ALC882 codecs on the same HD-audio bus isn't supported right now. The second codec would conflict. Dual audio codecs are not impossible but it makes things complicated.
Takashi
2008/1/18, Takashi Iwai tiwai@suse.de:
At Fri, 18 Jan 2008 17:10:06 +0100, Christophe Osuna wrote:
I have tried alsa-driver-hg20080117; it shows two additional mixer options (Mic Boost and Front Mic Boost) but in the end it's the same: I am unable to access the 3rd ADC.
Looks like your board disables the third ADC. The driver probes it and the codec returns it's no audio-input widget. Check codec#* proc output.
I have copied the contents of /proc/asound/card0/codec#2 at the end of this message. Notice that there are three nodes (0x07, 0x08 and 0x09) which claim to support PCM input.
The ALC882 datasheet states that "3 stereo ADCs support 16/20-bit PCM format, two for microphone array, one for legacy mixer recording". This is the only place that suggests there could be a difference, but I do not understand this sentence as "only 2 ADC can be used at a time" (English is not my native language). The block diagram in the following page does not suggest such a limit either.
The reality bites sometimes :)
I really want to believe this codec can do three things at a time.
Besides that I have read in the same datasheet that "rates in sub-multiples (1/n) of 48kHz are interleaving n frames containing no sample blocks" and so we can have 8 kHz by setting one sample block every six frames. Still, I can't set the device to 8 kHz.
How did you test it? The driver itself supports 8kHz, as long as the codec chip really returns the capability.
The same nodes I mentionned above (0x07, 0x08 and 0x09 in /proc/asound/card0/codec#2) show no support for 8 kHz sample rate. This is confirmed by the failing calls to snd_pcm_hw_params_set_rate().
Using two ALC882 codecs on the same HD-audio bus isn't supported right now. The second codec would conflict. Dual audio codecs are not impossible but it makes things complicated.
This is interesting information, thanks.
----------[ contents of /proc/asound/card0/codec#2 ]----------
Codec: Realtek ALC882 Address: 2 Vendor Id: 0x10ec0882 Subsystem Id: 0x10ec0882 Revision Id: 0x100101 No Modem Function Group found Default PCM: rates [0x560]: 44100 48000 96000 192000 bits [0xe]: 16 20 24 formats [0x1]: PCM Default Amp-In caps: N/A Default Amp-Out caps: N/A Node 0x02 [Audio Output] wcaps 0x11: Stereo PCM: rates [0x560]: 44100 48000 96000 192000 bits [0xe]: 16 20 24 formats [0x1]: PCM Node 0x03 [Audio Output] wcaps 0x11: Stereo PCM: rates [0x560]: 44100 48000 96000 192000 bits [0xe]: 16 20 24 formats [0x1]: PCM Node 0x04 [Audio Output] wcaps 0x11: Stereo PCM: rates [0x560]: 44100 48000 96000 192000 bits [0xe]: 16 20 24 formats [0x1]: PCM Node 0x05 [Audio Output] wcaps 0x11: Stereo PCM: rates [0x560]: 44100 48000 96000 192000 bits [0xe]: 16 20 24 formats [0x1]: PCM Node 0x06 [Audio Output] wcaps 0x211: Stereo Digital PCM: rates [0x560]: 44100 48000 96000 192000 bits [0x1e]: 16 20 24 32 formats [0x1]: PCM Node 0x07 [Audio Input] wcaps 0x10011b: Stereo Amp-In Amp-In caps: ofs=0x08, nsteps=0x1f, stepsize=0x05, mute=1 Amp-In vals: [0x0b 0x0b] PCM: rates [0x160]: 44100 48000 96000 bits [0x6]: 16 20 formats [0x1]: PCM Connection: 1 0x24 Node 0x08 [Audio Input] wcaps 0x10011b: Stereo Amp-In Amp-In caps: ofs=0x08, nsteps=0x1f, stepsize=0x05, mute=1 Amp-In vals: [0x0e 0x0e] PCM: rates [0x160]: 44100 48000 96000 bits [0x6]: 16 20 formats [0x1]: PCM Connection: 1 0x23 Node 0x09 [Audio Input] wcaps 0x10011b: Stereo Amp-In Amp-In caps: ofs=0x08, nsteps=0x1f, stepsize=0x05, mute=1 Amp-In vals: [0x0f 0x0f] PCM: rates [0x160]: 44100 48000 96000 bits [0x6]: 16 20 formats [0x1]: PCM Connection: 1 0x22 Node 0x0a [Audio Input] wcaps 0x100391: Stereo Digital PCM: rates [0x560]: 44100 48000 96000 192000 bits [0x1e]: 16 20 24 32 formats [0x1]: PCM Connection: 1 0x1f Node 0x0b [Audio Mixer] wcaps 0x20010b: Stereo Amp-In Amp-In caps: ofs=0x17, nsteps=0x1f, stepsize=0x05, mute=1 Amp-In vals: [0x80 0x80] [0x80 0x80] [0x80 0x80] [0x80 0x80] [0x80 0x80] [0x97 0x97] [0x97 0] Connection: 10 0x18 0x19 0x1a 0x1b 0x1c 0x1d 0x14 0x15 0x16 0x17 Node 0x0c [Audio Mixer] wcaps 0x20010f: Stereo Amp-In Amp-Out Amp-In caps: ofs=0x00, nsteps=0x00, stepsize=0x00, mute=1 Amp-In vals: [0x00 0x00] [0x00 0x00] Amp-Out caps: ofs=0x1f, nsteps=0x1f, stepsize=0x05, mute=0 Amp-Out vals: [0x00 0x00] Connection: 2 0x02 0x0b Node 0x0d [Audio Mixer] wcaps 0x20010f: Stereo Amp-In Amp-Out Amp-In caps: ofs=0x00, nsteps=0x00, stepsize=0x00, mute=1 Amp-In vals: [0x00 0x00] [0x00 0x00] Amp-Out caps: ofs=0x1f, nsteps=0x1f, stepsize=0x05, mute=0 Amp-Out vals: [0x00 0x00] Connection: 2 0x03 0x0b Node 0x0e [Audio Mixer] wcaps 0x20010f: Stereo Amp-In Amp-Out Amp-In caps: ofs=0x00, nsteps=0x00, stepsize=0x00, mute=1 Amp-In vals: [0x00 0x00] [0x00 0x00] Amp-Out caps: ofs=0x1f, nsteps=0x1f, stepsize=0x05, mute=0 Amp-Out vals: [0x00 0x00] Connection: 2 0x04 0x0b Node 0x0f [Audio Mixer] wcaps 0x20010f: Stereo Amp-In Amp-Out Amp-In caps: ofs=0x00, nsteps=0x00, stepsize=0x00, mute=1 Amp-In vals: [0x00 0x00] [0x00 0x00] Amp-Out caps: ofs=0x1f, nsteps=0x1f, stepsize=0x05, mute=0 Amp-Out vals: [0x00 0x00] Connection: 2 0x05 0x0b Node 0x10 [Vendor Defined Widget] wcaps 0xf00000: Mono Node 0x11 [Vendor Defined Widget] wcaps 0xf00000: Mono Node 0x12 [Vendor Defined Widget] wcaps 0xf00000: Mono Node 0x13 [Vendor Defined Widget] wcaps 0xf00000: Mono Node 0x14 [Pin Complex] wcaps 0x40018f: Stereo Amp-In Amp-Out Amp-In caps: ofs=0x00, nsteps=0x03, stepsize=0x27, mute=0 Amp-In vals: [0x00 0x00] [0x00 0x00] [0x00 0x00] [0x00 0x00] [0x00 0x00] Amp-Out caps: ofs=0x00, nsteps=0x00, stepsize=0x00, mute=1 Amp-Out vals: [0x00 0x00] Pincap 0x083f: IN OUT HP Detect Pin Default 0x01014011: [Jack] Line Out at Ext Rear Conn = 1/8, Color = Green EAPD: 0x0 Pin-ctls: 0x40: OUT Connection: 5 0x0c* 0x0d 0x0e 0x0f 0x26 Node 0x15 [Pin Complex] wcaps 0x40018f: Stereo Amp-In Amp-Out Amp-In caps: ofs=0x00, nsteps=0x03, stepsize=0x27, mute=0 Amp-In vals: [0x00 0x00] [0x00 0x00] [0x00 0x00] [0x00 0x00] [0x00 0x00] Amp-Out caps: ofs=0x00, nsteps=0x00, stepsize=0x00, mute=1 Amp-Out vals: [0x00 0x00] Pincap 0x083f: IN OUT HP Detect Pin Default 0x01011012: [Jack] Line Out at Ext Rear Conn = 1/8, Color = Black EAPD: 0x0 Pin-ctls: 0x40: OUT Connection: 5 0x0c 0x0d* 0x0e 0x0f 0x26 Node 0x16 [Pin Complex] wcaps 0x40018f: Stereo Amp-In Amp-Out Amp-In caps: ofs=0x00, nsteps=0x03, stepsize=0x27, mute=0 Amp-In vals: [0x00 0x00] [0x00 0x00] [0x00 0x00] [0x00 0x00] [0x00 0x00] Amp-Out caps: ofs=0x00, nsteps=0x00, stepsize=0x00, mute=1 Amp-Out vals: [0x00 0x00] Pincap 0x083f: IN OUT HP Detect Pin Default 0x01016013: [Jack] Line Out at Ext Rear Conn = 1/8, Color = Orange EAPD: 0x0 Pin-ctls: 0x40: OUT Connection: 5 0x0c 0x0d 0x0e* 0x0f 0x26 Node 0x17 [Pin Complex] wcaps 0x40018f: Stereo Amp-In Amp-Out Amp-In caps: ofs=0x00, nsteps=0x03, stepsize=0x27, mute=0 Amp-In vals: [0x00 0x00] [0x00 0x00] [0x00 0x00] [0x00 0x00] [0x00 0x00] Amp-Out caps: ofs=0x00, nsteps=0x00, stepsize=0x00, mute=1 Amp-Out vals: [0x00 0x00] Pincap 0x083f: IN OUT HP Detect Pin Default 0x01012014: [Jack] Line Out at Ext Rear Conn = 1/8, Color = Grey EAPD: 0x0 Pin-ctls: 0x40: OUT Connection: 5 0x0c 0x0d 0x0e 0x0f* 0x26 Node 0x18 [Pin Complex] wcaps 0x40018f: Stereo Amp-In Amp-Out Amp-In caps: ofs=0x00, nsteps=0x03, stepsize=0x27, mute=0 Amp-In vals: [0x00 0x00] [0x00 0x00] [0x00 0x00] [0x00 0x00] [0x00 0x00] Amp-Out caps: ofs=0x00, nsteps=0x00, stepsize=0x00, mute=1 Amp-Out vals: [0x80 0x80] Pincap 0x08173f: IN OUT HP Detect Pin Default 0x01a19011: [Jack] Mic at Ext Rear Conn = 1/8, Color = Pink EAPD: 0x0 Pin-ctls: 0x24: IN Connection: 5 0x0c* 0x0d 0x0e 0x0f 0x26 Node 0x19 [Pin Complex] wcaps 0x40018f: Stereo Amp-In Amp-Out Amp-In caps: ofs=0x00, nsteps=0x03, stepsize=0x27, mute=0 Amp-In vals: [0x00 0x00] [0x00 0x00] [0x00 0x00] [0x00 0x00] [0x00 0x00] Amp-Out caps: ofs=0x00, nsteps=0x00, stepsize=0x00, mute=1 Amp-Out vals: [0x80 0x80] Pincap 0x08173f: IN OUT HP Detect Pin Default 0x02a19011: [Jack] Mic at Ext Front Conn = 1/8, Color = Pink EAPD: 0x0 Pin-ctls: 0x24: IN Connection: 5 0x0c* 0x0d 0x0e 0x0f 0x26 Node 0x1a [Pin Complex] wcaps 0x40018f: Stereo Amp-In Amp-Out Amp-In caps: ofs=0x00, nsteps=0x03, stepsize=0x27, mute=0 Amp-In vals: [0x00 0x00] [0x00 0x00] [0x00 0x00] [0x00 0x00] [0x00 0x00] Amp-Out caps: ofs=0x00, nsteps=0x00, stepsize=0x00, mute=1 Amp-Out vals: [0x80 0x80] Pincap 0x08173f: IN OUT HP Detect Pin Default 0x01813011: [Jack] Line In at Ext Rear Conn = 1/8, Color = Blue EAPD: 0x0 Pin-ctls: 0x20: IN Connection: 5 0x0c* 0x0d 0x0e 0x0f 0x26 Node 0x1b [Pin Complex] wcaps 0x40018f: Stereo Amp-In Amp-Out Amp-In caps: ofs=0x00, nsteps=0x03, stepsize=0x27, mute=0 Amp-In vals: [0x00 0x00] [0x00 0x00] [0x00 0x00] [0x00 0x00] [0x00 0x00] Amp-Out caps: ofs=0x00, nsteps=0x00, stepsize=0x00, mute=1 Amp-Out vals: [0x00 0x00] Pincap 0x08173f: IN OUT HP Detect Pin Default 0x02214011: [Jack] HP Out at Ext Front Conn = 1/8, Color = Green EAPD: 0x0 Pin-ctls: 0xc0: OUT HP Connection: 5 0x0c* 0x0d 0x0e 0x0f 0x26 Node 0x1c [Pin Complex] wcaps 0x400001: Stereo Pincap 0x0820: IN Pin Default 0x99331011: [Fixed] CD at Int ATAPI Conn = ATAPI, Color = Black EAPD: 0x0 Pin-ctls: 0x00: Node 0x1d [Pin Complex] wcaps 0x400000: Mono Pincap 0x0820: IN Pin Default 0x90f71011: [Fixed] Other at Int N/A Conn = Analog, Color = Black EAPD: 0x0 Pin-ctls: 0x00: Node 0x1e [Pin Complex] wcaps 0x400300: Mono Digital Pincap 0x0810: OUT Pin Default 0x01446011: [Jack] SPDIF Out at Ext Rear Conn = RCA, Color = Orange Pin-ctls: 0x00: Connection: 1 0x06 Node 0x1f [Pin Complex] wcaps 0x400200: Mono Digital Pincap 0x0820: IN Pin Default 0x01c41011: [Jack] SPDIF In at Ext Rear Conn = RCA, Color = Black Pin-ctls: 0x00: Node 0x20 [Vendor Defined Widget] wcaps 0xf00040: Mono Node 0x21 [Volume Knob Widget] wcaps 0x600080: Mono Volume-Knob: delta=0, steps=32, direct=0, val=64 Connection: 0 Node 0x22 [Audio Mixer] wcaps 0x20010f: Stereo Amp-In Amp-Out Amp-In caps: ofs=0x00, nsteps=0x00, stepsize=0x00, mute=1 Amp-In vals: [0x80 0x80] [0x80 0x80] [0x00 0x00] [0x80 0x80] [0x80 0x80] [0x80 0x80] [0x80 0] Amp-Out caps: N/A Amp-Out vals: [0x00 0x00] Connection: 11 0x18 0x19 0x1a 0x1b 0x1c 0x1d 0x14 0x15 0x16 0x17 0x0b Node 0x23 [Audio Mixer] wcaps 0x20010f: Stereo Amp-In Amp-Out Amp-In caps: ofs=0x00, nsteps=0x00, stepsize=0x00, mute=1 Amp-In vals: [0x80 0x80] [0x00 0x00] [0x80 0x80] [0x80 0x80] [0x80 0x80] [0x80 0x80] [0x80 0] Amp-Out caps: N/A Amp-Out vals: [0x00 0x00] Connection: 11 0x18 0x19 0x1a 0x1b 0x1c 0x1d 0x14 0x15 0x16 0x17 0x0b Node 0x24 [Audio Mixer] wcaps 0x20010f: Stereo Amp-In Amp-Out Amp-In caps: ofs=0x00, nsteps=0x00, stepsize=0x00, mute=1 Amp-In vals: [0x00 0x00] [0x80 0x80] [0x80 0x80] [0x80 0x80] [0x80 0x80] [0x80 0x80] [0x80 0] Amp-Out caps: N/A Amp-Out vals: [0x00 0x00] Connection: 11 0x18 0x19 0x1a 0x1b 0x1c 0x1d 0x14 0x15 0x16 0x17 0x0b Node 0x25 [Audio Output] wcaps 0x11: Stereo PCM: rates [0x560]: 44100 48000 96000 192000 bits [0xe]: 16 20 24 formats [0x1]: PCM Node 0x26 [Audio Mixer] wcaps 0x20010f: Stereo Amp-In Amp-Out Amp-In caps: ofs=0x00, nsteps=0x00, stepsize=0x00, mute=1 Amp-In vals: [0x00 0x00] [0x00 0x00] Amp-Out caps: ofs=0x1f, nsteps=0x1f, stepsize=0x05, mute=0 Amp-Out vals: [0x1f 0x1f] Connection: 2 0x25 0x0b
At Fri, 18 Jan 2008 17:50:38 +0100, Christophe Osuna wrote:
2008/1/18, Takashi Iwai tiwai@suse.de:
At Fri, 18 Jan 2008 17:10:06 +0100, Christophe Osuna wrote:
I have tried alsa-driver-hg20080117; it shows two additional mixer options (Mic Boost and Front Mic Boost) but in the end it's the same: I am unable to access the 3rd ADC.
Looks like your board disables the third ADC. The driver probes it and the codec returns it's no audio-input widget. Check codec#* proc output.
I have copied the contents of /proc/asound/card0/codec#2 at the end of this message. Notice that there are three nodes (0x07, 0x08 and 0x09) which claim to support PCM input.
Ah, then it's in patch_realtek.c where alc880_pcm_analog_capture claims substreams = 2. Feel free to fix it.
The ALC882 datasheet states that "3 stereo ADCs support 16/20-bit PCM format, two for microphone array, one for legacy mixer recording". This is the only place that suggests there could be a difference, but I do not understand this sentence as "only 2 ADC can be used at a time" (English is not my native language). The block diagram in the following page does not suggest such a limit either.
The reality bites sometimes :)
I really want to believe this codec can do three things at a time.
Not always. There must be a reason for one codec being disabled on many devices.
Besides that I have read in the same datasheet that "rates in sub-multiples (1/n) of 48kHz are interleaving n frames containing no sample blocks" and so we can have 8 kHz by setting one sample block every six frames. Still, I can't set the device to 8 kHz.
How did you test it? The driver itself supports 8kHz, as long as the codec chip really returns the capability.
The same nodes I mentionned above (0x07, 0x08 and 0x09 in /proc/asound/card0/codec#2) show no support for 8 kHz sample rate. This is confirmed by the failing calls to snd_pcm_hw_params_set_rate().
Then actually the codec doesn't support 8kHz. Or, at least, the hardware vendor doesn't want it to work on 8kHz by any reason.
Of course, you can try to override in the driver, but it's definitely at your own risk...
Takashi
2008/1/18, Takashi Iwai tiwai@suse.de:
At Fri, 18 Jan 2008 17:50:38 +0100, Christophe Osuna wrote:
2008/1/18, Takashi Iwai tiwai@suse.de:
Looks like your board disables the third ADC. The driver probes it and the codec returns it's no audio-input widget. Check codec#* proc output.
I have copied the contents of /proc/asound/card0/codec#2 at the end of this message. Notice that there are three nodes (0x07, 0x08 and 0x09) which claim to support PCM input.
Ah, then it's in patch_realtek.c where alc880_pcm_analog_capture claims substreams = 2. Feel free to fix it.
OK.
That's not the kind of things I want to try on a Friday before leaving work, so I will try that next week and report results here.
The same nodes I mentionned above (0x07, 0x08 and 0x09 in /proc/asound/card0/codec#2) show no support for 8 kHz sample rate. This is confirmed by the failing calls to snd_pcm_hw_params_set_rate().
Then actually the codec doesn't support 8kHz. Or, at least, the hardware vendor doesn't want it to work on 8kHz by any reason.
Of course, you can try to override in the driver, but it's definitely at your own risk...
I think it is worth trying (same patch_realtek.c file, isn't it?). In the worst case we will use a software resampler (8 kHz <-> 48 kHz shouldn't be too difficult), but I would prefer leaving that to the codec.
At Fri, 18 Jan 2008 18:11:05 +0100, Christophe Osuna wrote:
2008/1/18, Takashi Iwai tiwai@suse.de:
At Fri, 18 Jan 2008 17:50:38 +0100, Christophe Osuna wrote:
2008/1/18, Takashi Iwai tiwai@suse.de:
Looks like your board disables the third ADC. The driver probes it and the codec returns it's no audio-input widget. Check codec#* proc output.
I have copied the contents of /proc/asound/card0/codec#2 at the end of this message. Notice that there are three nodes (0x07, 0x08 and 0x09) which claim to support PCM input.
Ah, then it's in patch_realtek.c where alc880_pcm_analog_capture claims substreams = 2. Feel free to fix it.
OK.
That's not the kind of things I want to try on a Friday before leaving work, so I will try that next week and report results here.
Just deeper looking at the code, I found it's indeed buggy for the secondary ADCs. The patch below should fix it.
The second and third ADCs are assigned to PCM#2 while the first ADC is to PCM#0. This is for avoiding the confusion of dsnoop and multi-streams.
Give it a try and check whether it doesn't break, at least, for recording the first ADC. If it's OK, I'll apply it to the HG tree later.
BTW, the patch also includes a code snippet to support the alt playback stream, e.g. for VoIP, but not fully implemented.
Takashi
--- diff -r a035d5e4801c pci/hda/patch_realtek.c --- a/pci/hda/patch_realtek.c Fri Jan 18 15:32:32 2008 +0100 +++ b/pci/hda/patch_realtek.c Fri Jan 18 18:25:24 2008 +0100 @@ -220,6 +220,8 @@ struct alc_spec { char *stream_name_analog; /* analog PCM stream */ struct hda_pcm_stream *stream_analog_playback; struct hda_pcm_stream *stream_analog_capture; + struct hda_pcm_stream *stream_analog_alt_playback; + struct hda_pcm_stream *stream_analog_alt_capture;
char *stream_name_digital; /* digital PCM stream */ struct hda_pcm_stream *stream_digital_playback; @@ -230,6 +232,7 @@ struct alc_spec { * max_channels, dacs must be set * dig_out_nid and hp_nid are optional */ + hda_nid_t alt_dac_nid;
/* capture */ unsigned int num_adc_nids; @@ -2370,7 +2373,7 @@ static int alc880_dig_playback_pcm_close /* * Analog capture */ -static int alc880_capture_pcm_prepare(struct hda_pcm_stream *hinfo, +static int alc880_alt_capture_pcm_prepare(struct hda_pcm_stream *hinfo, struct hda_codec *codec, unsigned int stream_tag, unsigned int format, @@ -2378,18 +2381,18 @@ static int alc880_capture_pcm_prepare(st { struct alc_spec *spec = codec->spec;
- snd_hda_codec_setup_stream(codec, spec->adc_nids[substream->number], + snd_hda_codec_setup_stream(codec, spec->adc_nids[substream->number + 1], stream_tag, 0, format); return 0; }
-static int alc880_capture_pcm_cleanup(struct hda_pcm_stream *hinfo, +static int alc880_alt_capture_pcm_cleanup(struct hda_pcm_stream *hinfo, struct hda_codec *codec, struct snd_pcm_substream *substream) { struct alc_spec *spec = codec->spec;
- snd_hda_codec_setup_stream(codec, spec->adc_nids[substream->number], + snd_hda_codec_setup_stream(codec, spec->adc_nids[substream->number + 1], 0, 0, 0); return 0; } @@ -2410,13 +2413,27 @@ static struct hda_pcm_stream alc880_pcm_ };
static struct hda_pcm_stream alc880_pcm_analog_capture = { - .substreams = 2, + .substreams = 1, + .channels_min = 2, + .channels_max = 2, + /* NID is set in alc_build_pcms */ +}; + +static struct hda_pcm_stream alc880_pcm_analog_alt_playback = { + .substreams = 1, + .channels_min = 2, + .channels_max = 2, + /* NID is set in alc_build_pcms */ +}; + +static struct hda_pcm_stream alc880_pcm_analog_alt_capture = { + .substreams = 2, /* can be overridden */ .channels_min = 2, .channels_max = 2, /* NID is set in alc_build_pcms */ .ops = { - .prepare = alc880_capture_pcm_prepare, - .cleanup = alc880_capture_pcm_cleanup + .prepare = alc880_alt_capture_pcm_prepare, + .cleanup = alc880_alt_capture_pcm_cleanup }, };
@@ -2440,7 +2457,7 @@ static struct hda_pcm_stream alc880_pcm_ };
/* Used by alc_build_pcms to flag that a PCM has no playback stream */ -static struct hda_pcm_stream alc_pcm_null_playback = { +static struct hda_pcm_stream alc_pcm_null_stream = { .substreams = 0, .channels_min = 0, .channels_max = 0, @@ -2497,17 +2514,32 @@ static int alc_build_pcms(struct hda_cod * model, configure a second analog capture-only PCM. */ /* Additional Analaog capture for index #2 */ - if (spec->num_adc_nids > 1 && spec->stream_analog_capture && - spec->adc_nids) { + if ((spec->alt_dac_nid && spec->stream_analog_alt_playback) || + (spec->num_adc_nids > 1 && spec->stream_analog_alt_capture)) { codec->num_pcms = 3; info = spec->pcm_rec + 2; info->name = spec->stream_name_analog; - /* No playback stream for second PCM */ - info->stream[SNDRV_PCM_STREAM_PLAYBACK] = alc_pcm_null_playback; - info->stream[SNDRV_PCM_STREAM_PLAYBACK].nid = 0; - if (spec->stream_analog_capture) { - info->stream[SNDRV_PCM_STREAM_CAPTURE] = *(spec->stream_analog_capture); - info->stream[SNDRV_PCM_STREAM_CAPTURE].nid = spec->adc_nids[1]; + if (spec->alt_dac_nid) { + info->stream[SNDRV_PCM_STREAM_PLAYBACK] = + *spec->stream_analog_alt_playback; + info->stream[SNDRV_PCM_STREAM_PLAYBACK].nid = + spec->alt_dac_nid; + } else { + info->stream[SNDRV_PCM_STREAM_PLAYBACK] = + alc_pcm_null_stream; + info->stream[SNDRV_PCM_STREAM_PLAYBACK].nid = 0; + } + if (spec->num_adc_nids > 1) { + info->stream[SNDRV_PCM_STREAM_CAPTURE] = + *spec->stream_analog_alt_capture; + info->stream[SNDRV_PCM_STREAM_CAPTURE].nid = + spec->adc_nids[1]; + info->stream[SNDRV_PCM_STREAM_CAPTURE].substreams = + spec->num_adc_nids - 1; + } else { + info->stream[SNDRV_PCM_STREAM_CAPTURE] = + alc_pcm_null_stream; + info->stream[SNDRV_PCM_STREAM_CAPTURE].nid = 0; } }
@@ -3615,6 +3647,7 @@ static int patch_alc880(struct hda_codec spec->stream_name_analog = "ALC880 Analog"; spec->stream_analog_playback = &alc880_pcm_analog_playback; spec->stream_analog_capture = &alc880_pcm_analog_capture; + spec->stream_analog_alt_capture = &alc880_pcm_analog_alt_capture;
spec->stream_name_digital = "ALC880 Digital"; spec->stream_digital_playback = &alc880_pcm_digital_playback; @@ -4527,17 +4560,8 @@ static struct hda_verb alc260_test_init_ }; #endif
-static struct hda_pcm_stream alc260_pcm_analog_playback = { - .substreams = 1, - .channels_min = 2, - .channels_max = 2, -}; - -static struct hda_pcm_stream alc260_pcm_analog_capture = { - .substreams = 1, - .channels_min = 2, - .channels_max = 2, -}; +#define alc260_pcm_analog_playback alc880_pcm_analog_alt_playback +#define alc260_pcm_analog_capture alc880_pcm_analog_capture
#define alc260_pcm_digital_playback alc880_pcm_digital_playback #define alc260_pcm_digital_capture alc880_pcm_digital_capture @@ -6204,6 +6228,9 @@ static int patch_alc882(struct hda_codec spec->stream_name_analog = "ALC882 Analog"; spec->stream_analog_playback = &alc882_pcm_analog_playback; spec->stream_analog_capture = &alc882_pcm_analog_capture; + /* FIXME: setup DAC5 */ + /*spec->stream_analog_alt_playback = &alc880_pcm_analog_alt_playback;*/ + spec->stream_analog_alt_capture = &alc880_pcm_analog_alt_capture;
spec->stream_name_digital = "ALC882 Digital"; spec->stream_digital_playback = &alc882_pcm_digital_playback; @@ -7409,6 +7436,7 @@ static struct snd_kcontrol_new alc883_ca /* pcm configuration: identiacal with ALC880 */ #define alc883_pcm_analog_playback alc880_pcm_analog_playback #define alc883_pcm_analog_capture alc880_pcm_analog_capture +#define alc883_pcm_analog_alt_capture alc880_pcm_analog_alt_capture #define alc883_pcm_digital_playback alc880_pcm_digital_playback #define alc883_pcm_digital_capture alc880_pcm_digital_capture
@@ -7894,6 +7922,7 @@ static int patch_alc883(struct hda_codec spec->stream_name_analog = "ALC883 Analog"; spec->stream_analog_playback = &alc883_pcm_analog_playback; spec->stream_analog_capture = &alc883_pcm_analog_capture; + spec->stream_analog_alt_capture = &alc883_pcm_analog_alt_capture;
spec->stream_name_digital = "ALC883 Digital"; spec->stream_digital_playback = &alc883_pcm_digital_playback; @@ -9821,6 +9850,7 @@ static void alc268_auto_init_mono_speake /* pcm configuration: identiacal with ALC880 */ #define alc268_pcm_analog_playback alc880_pcm_analog_playback #define alc268_pcm_analog_capture alc880_pcm_analog_capture +#define alc268_pcm_analog_alt_capture alc880_pcm_analog_alt_capture #define alc268_pcm_digital_playback alc880_pcm_digital_playback
/* @@ -10022,6 +10052,7 @@ static int patch_alc268(struct hda_codec spec->stream_name_analog = "ALC268 Analog"; spec->stream_analog_playback = &alc268_pcm_analog_playback; spec->stream_analog_capture = &alc268_pcm_analog_capture; + spec->stream_analog_alt_capture = &alc268_pcm_analog_alt_capture;
spec->stream_name_digital = "ALC268 Digital"; spec->stream_digital_playback = &alc268_pcm_digital_playback;
Tobin, thanks for all the information you provided.
2008/1/18, Tobin Davis tdavis@dsl-only.net:
Yes, it "should". But it also depends on the physical wiring of your system. If you have a system with only 3 audio jacks in the back, it is very difficult to have surround sound & 3 inputs at the same time.
I have plenty of jacks, including one "Mic", one "Front Mic" and one "Line In".
2008/1/18, Takashi Iwai tiwai@suse.de:
Just deeper looking at the code, I found it's indeed buggy for the secondary ADCs. The patch below should fix it.
The second and third ADCs are assigned to PCM#2 while the first ADC is to PCM#0. This is for avoiding the confusion of dsnoop and multi-streams.
Give it a try and check whether it doesn't break, at least, for recording the first ADC. If it's OK, I'll apply it to the HG tree later.
Thanks for the patch. Applying it did seem to solve the problem; now I can use the three ADC that are mapped to hw:0,0,0 hw:0,2,0 and hw:0,2,1. I have successfully tested the following commands
arecord -f dat -D hw:0,0,0 | aplay -f dat -D hw:0,0,0 arecord -f dat -D hw:0,2,0 | aplay -f dat -D hw:0,0,0 arecord -f dat -D hw:0,2,1 | aplay -f dat -D hw:0,0,0
It wasn't necessary to override the "substream" value in "alc880_pcm_analog_alt_capture" (I suppose that both analog_capture and analog_alt_capture are used). Now I need to check that I can open the three at the same time but I am rather confident on this.
Could you also tell me where I have to change code in order to force the 8 kHz sampling rate? I will try to add an ugly change to snd_hda_query_supported_pcm() but I am not sure on whether this is the right place.
At Mon, 21 Jan 2008 12:27:18 +0100, Christophe Osuna wrote:
Tobin, thanks for all the information you provided.
2008/1/18, Tobin Davis tdavis@dsl-only.net:
Yes, it "should". But it also depends on the physical wiring of your system. If you have a system with only 3 audio jacks in the back, it is very difficult to have surround sound & 3 inputs at the same time.
I have plenty of jacks, including one "Mic", one "Front Mic" and one "Line In".
2008/1/18, Takashi Iwai tiwai@suse.de:
Just deeper looking at the code, I found it's indeed buggy for the secondary ADCs. The patch below should fix it.
The second and third ADCs are assigned to PCM#2 while the first ADC is to PCM#0. This is for avoiding the confusion of dsnoop and multi-streams.
Give it a try and check whether it doesn't break, at least, for recording the first ADC. If it's OK, I'll apply it to the HG tree later.
Thanks for the patch. Applying it did seem to solve the problem; now I can use the three ADC that are mapped to hw:0,0,0 hw:0,2,0 and hw:0,2,1. I have successfully tested the following commands
arecord -f dat -D hw:0,0,0 | aplay -f dat -D hw:0,0,0 arecord -f dat -D hw:0,2,0 | aplay -f dat -D hw:0,0,0 arecord -f dat -D hw:0,2,1 | aplay -f dat -D hw:0,0,0
It wasn't necessary to override the "substream" value in "alc880_pcm_analog_alt_capture" (I suppose that both analog_capture and analog_alt_capture are used).
Just because it's two coindentally :)
Now I need to check that I can open the three at the same time but I am rather confident on this.
Thanks. Please let me know if it works. Then I'll apply the patch to HG tree.
Could you also tell me where I have to change code in order to force the 8 kHz sampling rate? I will try to add an ugly change to snd_hda_query_supported_pcm() but I am not sure on whether this is the right place.
You can override the info->streams[SNDRV_PCM_STREAM_CAPTURE].rates in alc_build_pcms(). It's zero as default, which means to probe the value from the codec.
Takashi
(sorry for the delay)
2008/1/21, Takashi Iwai tiwai@suse.de:
At Mon, 21 Jan 2008 12:27:18 +0100, Christophe Osuna wrote:
Now I need to check that I can open the three at the same time but I am rather confident on this.
Thanks. Please let me know if it works. Then I'll apply the patch to HG tree.
I have tested with three alsarecord reading from hw:0,0,0 hw:0,2,0 and hw:0,2,1 and piping into aplay (on dmix) and it worked fine.
I think the patch can make its way to the HG tree.
Could you also tell me where I have to change code in order to force the 8 kHz sampling rate? I will try to add an ugly change to snd_hda_query_supported_pcm() but I am not sure on whether this is the right place.
You can override the info->streams[SNDRV_PCM_STREAM_CAPTURE].rates in alc_build_pcms(). It's zero as default, which means to probe the value from the codec.
I have tried to set info->streams[SNDDRV_PCM_STREAM_CAPTURE].rates to SNDRV_PCM_RATE_8000 (and the same thing for playback) but "arecord | aplay" at 8 kHz gave strange results. Well, I will try to investigate more.
At Wed, 23 Jan 2008 14:53:00 +0100, Christophe Osuna wrote:
(sorry for the delay)
2008/1/21, Takashi Iwai tiwai@suse.de:
At Mon, 21 Jan 2008 12:27:18 +0100, Christophe Osuna wrote:
Now I need to check that I can open the three at the same time but I am rather confident on this.
Thanks. Please let me know if it works. Then I'll apply the patch to HG tree.
I have tested with three alsarecord reading from hw:0,0,0 hw:0,2,0 and hw:0,2,1 and piping into aplay (on dmix) and it worked fine.
I think the patch can make its way to the HG tree.
OK, now applied to HG tree. Thanks for confirmation.
Takashi
On Fri, 2008-01-18 at 17:50 +0100, Christophe Osuna wrote:
2008/1/18, Takashi Iwai tiwai@suse.de:
At Fri, 18 Jan 2008 17:10:06 +0100, Christophe Osuna wrote:
I have tried alsa-driver-hg20080117; it shows two additional mixer options (Mic Boost and Front Mic Boost) but in the end it's the
same:
I am unable to access the 3rd ADC.
Looks like your board disables the third ADC. The driver probes it and the codec returns it's no audio-input widget. Check codec#*
proc
output.
I have copied the contents of /proc/asound/card0/codec#2 at the end of this message. Notice that there are three nodes (0x07, 0x08 and 0x09) which claim to support PCM input.
Each of these three ADC's connect to their own selector nodes (22, 23, 24):
Node 0x09 [Audio Input] wcaps 0x10011b: Stereo Amp-In Amp-In caps: ofs=0x08, nsteps=0x1f, stepsize=0x05, mute=1 Amp-In vals: [0x0f 0x0f] PCM: rates [0x160]: 44100 48000 96000 <-- these are the sample rates that the hardware can be set to bits [0x6]: 16 20 formats [0x1]: PCM Connection: 1 0x22 <-- this is the node that it connects to.
These selector nodes are connected to all of the pins and one connection to the mixer. They are controlled by unmuting the individual pin node connection:
Node 0x22 [Audio Mixer] wcaps 0x20010f: Stereo Amp-In Amp-Out Amp-In caps: ofs=0x00, nsteps=0x00, stepsize=0x00, mute=1 Amp-In vals: [0x80 0x80] [0x80 0x80] [0x00 0x00] [0x80 0x80] [0x80 0x80] [0x80 0x80] [0x80 0] Amp-Out caps: N/A Amp-Out vals: [0x00 0x00] Connection: 11 0x18 0x19 0x1a 0x1b 0x1c 0x1d 0x14 0x15 0x16 0x17 0x0b
This is from your codec output. Based on this, I can see that ADC Node 9 is connected to Audio Mixer Node 22, and that Node 22 is allowing input from Pin Node 1A (Line In at Ext Rear). Note that these aren't volume controls, just mute/unmute (based on the Amp-In caps:
Now, the root of the problem is that the driver is currently not configured to allow full range of the codec capabilities. If it were, you would have a mute button for each amp val on each node, and a big mess trying to figure it out (at least without the codecgraph utility from a different email thread).
I'm currently swamped with other projects at the moment, otherwise I would try to implement a test model for that codec that would allow more control capability. It should be fairly easy to add an input selector to control each of the adc mixers.
The ALC882 datasheet states that "3 stereo ADCs support 16/20-bit
PCM
format, two for microphone array, one for legacy mixer recording". This is the only place that suggests there could be a difference,
but
I do not understand this sentence as "only 2 ADC can be used at a time" (English is not my native language). The block diagram in
the
following page does not suggest such a limit either.
The reality bites sometimes :)
I really want to believe this codec can do three things at a time.
Yes, it "should". But it also depends on the physical wiring of your system. If you have a system with only 3 audio jacks in the back, it is very difficult to have surround sound & 3 inputs at the same time.
Besides that I have read in the same datasheet that "rates in sub-multiples (1/n) of 48kHz are interleaving n frames containing
no
sample blocks" and so we can have 8 kHz by setting one sample
block
every six frames. Still, I can't set the device to 8 kHz.
How did you test it? The driver itself supports 8kHz, as long as
the
codec chip really returns the capability.
The same nodes I mentionned above (0x07, 0x08 and 0x09 in /proc/asound/card0/codec#2) show no support for 8 kHz sample rate. This is confirmed by the failing calls to snd_pcm_hw_params_set_rate().
The rate can only be set to what the codec supports. The rest is handled via software. (see above comment on Node 9)
Using two ALC882 codecs on the same HD-audio bus isn't supported
right
now. The second codec would conflict. Dual audio codecs are not impossible but it makes things complicated.
This is interesting information, thanks.
Actually, what this is describing is two (or more) physical codec chips on the same motherboard. This is definitely possible (I have this setup at home for development). The biggest difficulty is getting the added card configured for a different sdio port on the HDA bus. Some of the reference boards I have can be configured via jumpers, but some need a 0 ohm resister pulled and moved to a different pad (not an easy task for me).
I have an Intel desktop motherboard with an HDA header on the main board specifically for this purpose. As long as the added codec is configured for a different sdio, I'm good. It is configured via the probe_mask setting.
participants (3)
-
Christophe Osuna
-
Takashi Iwai
-
Tobin Davis