[alsa-devel] Support for Compal EL81 (Intel HDA/Realtek alc883)
Good evening. I am the lucky owner of a nice Compal EL80 laptop, sporting an Intel HDA audio controller with realtek alc883. Here is what I get with lspci -vvv:
00:1b.0 Audio device [0403]: Intel Corporation 82801G (ICH7 Family) High Definition Audio Controller [8086:27d8] (rev 02) Subsystem: COMPAL Electronics Inc Unknown device [14c0:0017] Control: I/O- Mem+ BusMaster+ SpecCycle- MemWINV- VGASnoop- ParErr- Stepping- SERR- FastB2B- Status: Cap+ 66MHz- UDF- FastB2B- ParErr- DEVSEL=fast >TAbort- <TAbort- <MAbort- >SERR- <PERR- Latency: 0, Cache Line Size: 64 bytes Interrupt: pin A routed to IRQ 22 Region 0: Memory at d2500000 (64-bit, non-prefetchable) [size=16K] Capabilities: [50] Power Management version 2 Flags: PMEClk- DSI- D1- D2- AuxCurrent=55mA PME(D0+,D1-,D2-,D3hot+,D3cold+) Status: D0 PME-Enable- DSel=0 DScale=0 PME- Capabilities: [60] Message Signalled Interrupts: Mask- 64bit+ Queue=0/0 Enable- Address: 0000000000000000 Data: 0000 Capabilities: [70] Express Unknown type IRQ 0 Device: Supported: MaxPayload 128 bytes, PhantFunc 0, ExtTag- Device: Latency L0s <64ns, L1 <1us Device: Errors: Correctable- Non-Fatal- Fatal- Unsupported- Device: RlxdOrd- ExtTag- PhantFunc- AuxPwr- NoSnoop+ Device: MaxPayload 128 bytes, MaxReadReq 128 bytes Link: Supported Speed unknown, Width x0, ASPM unknown, Port 0 Link: Latency L0s <64ns, L1 <1us Link: ASPM Disabled CommClk- ExtSynch- Link: Speed unknown, Width x0 Capabilities: [100] Virtual Channel Capabilities: [130] Unknown (5)
I had very elementary operativity, but missed much, including for example microphone boost. I applied the following patch:
--8<-----8<----8<----8<----8<----8<----8<----8<----8<----8<---8<--
--- /usr/src/alsa/alsa-kernel/pci/hda/patch_realtek.c 2007-02-15 20:00:04.000000000 +0100 +++ ./patch_realtek.c 2007-03-15 08:36:30.000000000 +0100 @@ -141,6 +141,7 @@ ALC883_ACER, ALC883_MEDION, ALC883_LAPTOP_EAPD, + ALC883_LAPTOP_COMPAL, ALC883_AUTO, ALC883_MODEL_LAST, }; @@ -5582,6 +5583,7 @@ [ALC883_ACER] = "acer", [ALC883_MEDION] = "medion", [ALC883_LAPTOP_EAPD] = "laptop-eapd", + [ALC883_LAPTOP_COMPAL] = "laptop-compal", [ALC883_AUTO] = "auto", };
@@ -5607,6 +5609,7 @@ SND_PCI_QUIRK(0x161f, 0x2054, "Medion laptop", ALC883_MEDION), SND_PCI_QUIRK(0x1071, 0x8258, "Evesham Voyaeger", ALC883_LAPTOP_EAPD), SND_PCI_QUIRK(0x8086, 0xd601, "D102GGC", ALC883_3ST_6ch), + SND_PCI_QUIRK(0x14c0, 0x0017, "Compal EL80", ALC883_LAPTOP_COMPAL), {} };
@@ -5747,6 +5750,76 @@ .channel_mode = alc883_3ST_2ch_modes, .input_mux = &alc883_capture_source, }, +#if 1 + [ALC883_LAPTOP_COMPAL] = { + .mixers = { alc883_base_mixer, + alc883_chmode_mixer }, + .init_verbs = { alc883_init_verbs, alc882_eapd_verbs }, + .num_dacs = ARRAY_SIZE(alc883_dac_nids), + .dac_nids = alc883_dac_nids, + .num_adc_nids = ARRAY_SIZE(alc883_adc_nids), + .adc_nids = alc883_adc_nids, + .num_channel_mode = ARRAY_SIZE(alc883_3ST_2ch_modes), + .channel_mode = alc883_3ST_2ch_modes, + .input_mux = &alc883_capture_source, + }, +#else + [ALC883_LAPTOP_COMPAL] = { + .mixers = { alc883_fivestack_mixer, --- /usr/src/alsa/alsa-kernel/pci/hda/patch_realtek.c 2007-02-15 20:00:04.000000000 +0100 +++ ./patch_realtek.c 2007-03-15 08:36:30.000000000 +0100 @@ -141,6 +141,7 @@ ALC883_ACER, ALC883_MEDION, ALC883_LAPTOP_EAPD, + ALC883_LAPTOP_COMPAL, ALC883_AUTO, ALC883_MODEL_LAST, }; @@ -5582,6 +5583,7 @@ [ALC883_ACER] = "acer", [ALC883_MEDION] = "medion", [ALC883_LAPTOP_EAPD] = "laptop-eapd", + [ALC883_LAPTOP_COMPAL] = "laptop-compal", [ALC883_AUTO] = "auto", };
@@ -5607,6 +5609,7 @@ SND_PCI_QUIRK(0x161f, 0x2054, "Medion laptop", ALC883_MEDION), SND_PCI_QUIRK(0x1071, 0x8258, "Evesham Voyaeger", ALC883_LAPTOP_EAPD), SND_PCI_QUIRK(0x8086, 0xd601, "D102GGC", ALC883_3ST_6ch), + SND_PCI_QUIRK(0x14c0, 0x0017, "Compal EL80", ALC883_LAPTOP_COMPAL), {} };
@@ -5747,6 +5750,76 @@ .channel_mode = alc883_3ST_2ch_modes, .input_mux = &alc883_capture_source, }, +#if 1 + [ALC883_LAPTOP_COMPAL] = { + .mixers = { alc883_base_mixer, + alc883_chmode_mixer }, + .init_verbs = { alc883_init_verbs, alc882_eapd_verbs }, + .num_dacs = ARRAY_SIZE(alc883_dac_nids), + .dac_nids = alc883_dac_nids, + .num_adc_nids = ARRAY_SIZE(alc883_adc_nids), + .adc_nids = alc883_adc_nids, + .num_channel_mode = ARRAY_SIZE(alc883_3ST_2ch_modes), + .channel_mode = alc883_3ST_2ch_modes, + .input_mux = &alc883_capture_source, + }, +#else + [ALC883_LAPTOP_COMPAL] = { + .mixers = { alc883_fivestack_mixer, + alc883_chmode_mixer }, + .init_verbs = { alc883_init_verbs, + alc883_medion_eapd_verbs }, + .num_dacs = ARRAY_SIZE(alc883_dac_nids), + .dac_nids = alc883_dac_nids, + .num_adc_nids = ARRAY_SIZE(alc883_adc_nids), + .adc_nids = alc883_adc_nids, + .num_channel_mode = ARRAY_SIZE(alc883_sixstack_modes), + .channel_mode = alc883_sixstack_modes, + .input_mux = &alc883_capture_source, + }, + [ALC883_LAPTOP_COMPAL] = { + .mixers = { alc883_3ST_2ch_mixer }, + .init_verbs = { alc883_init_verbs }, + .num_dacs = ARRAY_SIZE(alc883_dac_nids), + .dac_nids = alc883_dac_nids, + .dig_out_nid = ALC883_DIGOUT_NID, + .num_adc_nids = ARRAY_SIZE(alc883_adc_nids), + .adc_nids = alc883_adc_nids, + .dig_in_nid = ALC883_DIGIN_NID, + .num_channel_mode = ARRAY_SIZE(alc883_3ST_2ch_modes), + .channel_mode = alc883_3ST_2ch_modes, + .input_mux = &alc883_capture_source, + }, + [ALC883_LAPTOP_COMPAL] = { + .mixers = { alc883_3ST_6ch_mixer, alc883_chmode_mixer }, + .init_verbs = { alc883_init_verbs }, + .num_dacs = ARRAY_SIZE(alc883_dac_nids), + .dac_nids = alc883_dac_nids, + .dig_out_nid = ALC883_DIGOUT_NID, + .num_adc_nids = ARRAY_SIZE(alc883_adc_nids), + .adc_nids = alc883_adc_nids, + .dig_in_nid = ALC883_DIGIN_NID, + .num_channel_mode = ARRAY_SIZE(alc883_3ST_6ch_modes), + .channel_mode = alc883_3ST_6ch_modes, + .need_dac_fix = 1, + .input_mux = &alc883_capture_source, + }, + [ALC883_LAPTOP_COMPAL] = { + .mixers = { alc883_tagra_mixer, alc883_chmode_mixer }, + .init_verbs = { alc883_init_verbs, alc883_tagra_verbs}, + .num_dacs = ARRAY_SIZE(alc883_dac_nids), + .dac_nids = alc883_dac_nids, + .dig_out_nid = ALC883_DIGOUT_NID, + .num_adc_nids = ARRAY_SIZE(alc883_adc_nids), + .adc_nids = alc883_adc_nids, + .num_channel_mode = ARRAY_SIZE(alc883_3ST_6ch_modes), + .channel_mode = alc883_3ST_6ch_modes, + .need_dac_fix = 1, + .input_mux = &alc883_capture_source, + .unsol_event = alc883_tagra_unsol_event, + .init_hook = alc883_tagra_automute, + }, +#endif };
--8<-----8<----8<----8<----8<----8<----8<----8<----8<----8<---8<--
As you can see, I did various tests with possible 'alc_config_preset' structures. I could only copy from other existing examples, since I have no idea how you would obtain the correct values to insert there. With the first example, the only one that is commented in (copied from LAPTOP_EAPD), I could obtain a working microphone boost. The thing is far from perfect, though. Suffice to say that I find the main volume in the cursor labeled 'Surround' in alsamixer.
Is there any instruction about how to obtain the right information to configure this laptop of mine? Can you help? In this case, what other information may I provide?
Thanks in advance
Carlo - Den Haag, NL
At Sat, 24 Mar 2007 00:25:42 +0100, Carlo E. Prelz wrote:
As you can see, I did various tests with possible 'alc_config_preset' structures. I could only copy from other existing examples, since I have no idea how you would obtain the correct values to insert there. With the first example, the only one that is commented in (copied from LAPTOP_EAPD), I could obtain a working microphone boost. The thing is far from perfect, though. Suffice to say that I find the main volume in the cursor labeled 'Surround' in alsamixer.
Is there any instruction about how to obtain the right information to configure this laptop of mine? Can you help? In this case, what other information may I provide?
Most likely the pin configurations are completely different from other devices with ALC883. In such a case, we'd need to create another mixer elements and init verbs.
Please show /proc/asound/card0/codec#* files to figure out the default pin configs. Also, build with --with-debug=detect, load with model=auto option, and check the kernel message. It will show the pin detection information.
Takashi
Subject: Re: [alsa-devel] Support for Compal EL81 (Intel HDA/Realtek alc883) Date: lun 26 mar 07 02:56:53 +0200
Many thanks for your answer!
Quoting Takashi Iwai (tiwai@suse.de):
Most likely the pin configurations are completely different from other devices with ALC883. In such a case, we'd need to create another mixer elements and init verbs.
I see.
Please show /proc/asound/card0/codec#* files to figure out the default pin configs.
There are two of them I attach their contents here. Codec#1 appears to relate to the modem, for which I receive this message during boot:
si3054: cannot initialize. EXT MID = 0000
Also, build with --with-debug=detect, load with model=auto option, and check the kernel message. It will show the pin detection information.
I enabled the DEBUG_DETECT option from kernel configuration, and then loaded the module with this line:
modprobe snd_hda_intel model=auto
I hope this is what you meant. I got this output:
ACPI: PCI interrupt for device 0000:00:1b.0 disabled ACPI: PCI Interrupt 0000:00:1b.0[A] -> GSI 22 (level, low) -> IRQ 22 PCI: Setting latency timer of device 0000:00:1b.0 to 64 codec_mask = 0x3 Searching for vendor id 10ec0883, revision id 100002 hda_codec: model 'auto' is selected autoconfig: line_outs=0 (0x0/0x0/0x0/0x0/0x0) speaker_outs=1 (0x14/0x0/0x0/0x0/0x0) hp_outs=1 (0x15/0x0/0x0/0x0/0x0) inputs: mic=0x18, fmic=0x0, line=0x0, fline=0x0, cd=0x0, aux=0x0 Searching for vendor id 11c11040, revision id 100200 si3054: cannot initialize. EXT MID = 0000 Link Frame Detect(FDT) is not ready (line status: 0000)
If you need something else, please ask!
Carlo
participants (2)
-
Carlo E. Prelz
-
Takashi Iwai