Re: [alsa-devel] max channels of 3 jacks 6 channels motherboard using model=auto realtek codec
At Sun, 10 Jul 2011 08:47:46 +0200, Takashi Iwai wrote:
At Sun, 10 Jul 2011 11:31:44 +0800, Raymond Yau wrote:
2011/7/6 Takashi Iwai tiwai@suse.de:
At Wed, 6 Jul 2011 11:53:47 +0800, Raymond Yau wrote:
Refer to commit ce764ab22e40a046065c9417ee5f04ad2a816ac1
ALSA: hda - Add channel-mode support to Realtek auto-parser
It seem that max channel is six instead of two when the channel mode is 2ch for those 3 jacks motherboard
using hda-emu and alsa-info from http://thread.gmane.org/gmane.linux.alsa.devel/86816
PCM 0 p 44100 2 16
Open PCM ALC887 Analog for play Available PCM parameters: channels: 2/6 formats: S16_LE S32_LE rates: 44100 48000 96000 192000 Prepare PCM, rate=44100, channels=2, format=16 bits
because
spec->multiout.max_channels = spec->multiout.num_dacs * 2;
is assigned after alc_auto_add_multi_channel_mode() increase spec->multiout.num_dacs from 1 to 3
spec->multiout.num_dacs = num_pins + 1;
Right, and this is intentional. Since there should be enough amount of DACs, the driver keeps using the surround DACs statically. In that way, apps can keep opening the device in the surround mode while user can switch the outputs on the fly via channel-mode mixer enum.
How can the driver support 6 channels when the input jacks have not been retasked as output ?
Even if the pins aren't retasked, DACs can receive data. And then you can change the pins and routing on the fly.
You can open a two-channel PCM stream even if the master or (any other) volume is muted. A similar reason.
This behaviour seem different from model=3stack-6ch or model=3stack-6ch-dig or those via codec with smart51 "OFF"
The smart51 case is a bit different (we prefer DAC unused because of independent HP control), but the 3stack-6ch case is a regression, indeed. This was just because of dropped code snippet. Now I fixed with the patch below.
thanks,
Takashi
--- From: Takashi Iwai tiwai@suse.de Subject: [PATCH] ALSA: hda - Re-add need_dac_fix check for multi-io jacks of Realtek codecs
During the rewrite, the check of spec->need_dac_fix and the corresponding num_dacs change was dropped from the channel-mode control.
This patch re-adds it, and also enables need_dac_fix for ALC880 as default, as this feature was originally introduced to fix h/w bugs of this chip.
Signed-off-by: Takashi Iwai tiwai@suse.de --- sound/pci/hda/patch_realtek.c | 3 +++ 1 files changed, 3 insertions(+), 0 deletions(-)
diff --git a/sound/pci/hda/patch_realtek.c b/sound/pci/hda/patch_realtek.c index 124c63f..52ce075 100644 --- a/sound/pci/hda/patch_realtek.c +++ b/sound/pci/hda/patch_realtek.c @@ -3196,6 +3196,8 @@ static int alc_auto_ch_mode_put(struct snd_kcontrol *kcontrol, for (i = 0; i < spec->multi_ios; i++) alc_set_multi_io(codec, i, i < ch); spec->multiout.max_channels = spec->ext_channel_count; + if (spec->need_dac_fix && !spec->const_channel_count) + spec->multiout.num_dacs = spec->multiout.max_channels / 2; return 1; }
@@ -3642,6 +3644,7 @@ static int patch_alc880(struct hda_codec *codec) codec->spec = spec;
spec->mixer_nid = 0x0b; + spec->need_dac_fix = 1;
board_config = alc_board_config(codec, ALC880_MODEL_LAST, alc880_models, alc880_cfg_tbl);
2011/7/14 Takashi Iwai tiwai@suse.de:
At Sun, 10 Jul 2011 08:47:46 +0200, Takashi Iwai wrote:
At Sun, 10 Jul 2011 11:31:44 +0800, Raymond Yau wrote:
2011/7/6 Takashi Iwai tiwai@suse.de:
The smart51 case is a bit different (we prefer DAC unused because of independent HP control), but the 3stack-6ch case is a regression, indeed. This was just because of dropped code snippet.
How about SIgmatel/IDT codecs ? e.g Intel Desktop Board D946GZIS
https://bugs.launchpad.net/ubuntu/+source/alsa-driver/+bug/820092
Why there is no "channel mode" switch ?
How does PA server change from "stereo" to "surround40" or "surround51" profile ?
Refer to Documentation/alsa/HD-Audio-Controls.txt
SIgmatel/IDT codecs
* Mic Jack Mode, Line Jack Mode, etc These enum controls the direction and the bias of the input jack pins. Depending on the jack type, it can set as "Mic In" and "Line In", for determining the input bias, or it can be set to "Line Out" when the pin is a multi-I/O jack for surround channels.
http://www.intel.com/support/motherboards/desktop/d946gzis/sb/CS-022973.htm
Refer to Intel Desktop Board D946GZIS Product Guide
* Front panel audio connector, including functionality for: -- Line out -- Microphone in
Back panel audio connectors that are configurable through the audio device drivers: -- Line in/retasking jack -- Line out/retasking jack -- Mic in/retasking jack
using hda-emu
hda-emu codecs/stac9227-intel-d946gzis-mobo
hda_codec: STAC9227: BIOS auto-probing. autoconfig: line_outs=3 (0xd/0xf/0xe/0x0/0x0) type:speaker speaker_outs=0 (0x0/0x0/0x0/0x0/0x0) hp_outs=1 (0xa/0x0/0x0/0x0/0x0) mono: mono_out=0x0 inputs: Mic=0xb
CTRL: add: Speaker Playback Volume:0 CTRL: add: Speaker Playback Switch:0 CTRL: add: Speaker Playback Volume:1 CTRL: add: Speaker Playback Switch:1 CTRL: add: Center Playback Volume:0 CTRL: add: Center Playback Switch:0 CTRL: add: LFE Playback Volume:0 CTRL: add: LFE Playback Switch:0 CTRL: add: Swap Center/LFE Playback Switch:0 CTRL: add: Front Mic Jack Mode:0 CTRL: add: Beep Playback Volume:0 CTRL: add: Beep Playback Switch:0 CTRL: add: Headphone Playback Volume:0 CTRL: add: Headphone Playback Switch:0 CTRL: add: Capture Volume:0 CTRL: add: Capture Switch:0 CTRL: add: Capture Volume:1 CTRL: add: Capture Switch:1 CTRL: add: Capture Volume:2 CTRL: add: Capture Switch:2 CTRL: add: Mux Capture Volume:0 CTRL: add: Mux Capture Volume:1 CTRL: add: Mux Capture Volume:2 CTRL: add: IEC958 Playback Source:0 CTRL: add: Master Playback Volume:0 Cannot find slave Front Playback Volume, skipped Cannot find slave Surround Playback Volume, skipped Cannot find slave Side Playback Volume, skipped CTRL: add: Master Playback Switch:0 Cannot find slave Front Playback Switch, skipped Cannot find slave Surround Playback Switch, skipped Cannot find slave Side Playback Switch, skipped Cannot find slave IEC958 Playback Switch, skipped JACK created Headphone, type 1 JACK created Line-out, type 4 JACK created Line-out, type 4 JACK created Line-out, type 4 JACK created Mic, type 2
get 10
send: NID=0xb, VERB=0xf07(get_pin_ctl), PARM=0x0 receive: 0x24 10 Front Mic Jack Mode:0 ITEM: 0:Mic In, 1:Line In, VAL: [Mic In]
participants (2)
-
Raymond Yau
-
Takashi Iwai