Patch for AD1986 AC97 CODEC
Takashi,
Attached please find the third and final installment of separated patches you requested.
I have retested all 3 patches applied to ALSA 1.0.13. (The patches were derived sequentially from Mercurial.)
I decided to leave out the output volume control renaming for the AD1986, because 1) I found the name "Master Surround" to be confusing, since "Surround" is used to refer to the rear channels of a multichannel configuration. Also renaming "Headphone" to "Master" makes no sense for the AD1986, since the AD1986 has separate Headphone pins, unlike the AD1888, AD1980 and AD1985 for which the same pins are used for either the Headphone or Surround outputs.
I do plan to revisit output volume control names in the future. The AD1986 uses volume controls somewhat differently than most AC '97 Devices. For example, normally for AC '97 devices, register 0x18 controls DAC PCM attenuation for all channels; the AD1986 uses a special "ADI Mode" configuration in which register 0x18 controls DAC PCM attenuation only for the front channels, with other registers controlling DAC PCM attenuation for the other channels.
The AD1888, AD1980 and AD1985 can be configured in software to use either the AC '97 Compatibility mode or the ADI Mode. (In ALSA currently they are fixed in ADI Mode.) The AD1986 can use only the ADI Mode.
FYI: The AD1986 and AD1986A have the same Vendor ID codes, and therefore are indistinguishable from an AC '97 perspective. The difference is the AD1986 is AC '97 only, and the AD1986A can be configured for AC '97 or HD Audio use.
Randy Cushman
Summary: fix various issues with AD1986/AD1986A support
Previously, ac97_codec.c was coded to support AD1986 and AD1986A CODECs using code written for the AD1985 CODEC. This allowed the LINE_OUT and HEADPHONE jacks to function properly, however register differences between the CODECs prevented line and microphone inputs from functioning.
Specifically, this patch fixes issues with the following mixer
controls: 'V_REFOUT', 'Spread Front to Surround and Center/LFE', 'Exchange Front/Surround', 'Surround Jack Mode', and 'Channel Mode'. This patch removes the undocumented AD1888 control
'High Pass Filter Enable' and adds the new control 'Exchange Mic/Line In'.
alsa-kernel/include/ac97_codec.h +1 -0
@@ -503,6 +503,7 @@unsigned short id[3 ];// codec IDs (lower 16-bit word) unsigned short pcmreg[3 ];// PCM registers unsigned short codec_cfg[3 ];// CODEC_CFG bits +unsigned char swap_mic_linein;// AD1986/AD1986A only } ad18xx;unsigned int dev_flags;/* device specific */ } spec;
alsa-kernel/pci/ac97/ac97_codec.c +1 -1
@@ -111,7 +111,7 @@ { 0x41445372, 0xffffffff, "AD1981A", patch_ad1981a, NULL }, { 0x41445374, 0xffffffff, "AD1981B", patch_ad1981b, NULL }, { 0x41445375, 0xffffffff, "AD1985", patch_ad1985, NULL }, -{ 0x41445378, 0xffffffff, "AD1986", patch_ad1985, NULL }, +{ 0x41445378, 0xffffffff, "AD1986", patch_ad1986, NULL }, { 0x414c4300, 0xffffff00, "ALC100,100P", NULL, NULL }, { 0x414c4710, 0xfffffff0, "ALC200,200P", NULL, NULL }, { 0x414c4721, 0xffffffff, "ALC650D", NULL, NULL }, /* already patched */
alsa-kernel/pci/ac97/ac97_patch.c +366 -1
385 lines not on this page · raw message
alsa-kernel/pci/ac97/ac97_patch.h +1 -0
@@ -48,6 +48,7 @@int patch_ad1981a (struct snd_ac97 * ac97);int patch_ad1981b (struct snd_ac97 * ac97);int patch_ad1985 (struct snd_ac97 * ac97); +int patch_ad1986 (struct snd_ac97 * ac97);int patch_alc650 (struct snd_ac97 * ac97);int patch_alc655 (struct snd_ac97 * ac97);int patch_alc850 (struct snd_ac97 * ac97);
-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your opinions on IT & business topics through brief surveys - and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
Alsa-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/alsa-devel
At Thu, 21 Dec 2006 13:30:03 -0500,
Quoted 5 lines · Randy Cushman
Takashi,
Attached please find the third and final installment of separated patches you requested.
Thanks. Now I applied it to ALSA HG tree.
Quoted 20 lines
I have retested all 3 patches applied to ALSA 1.0.13. (The patches were derived sequentially from Mercurial.)
I decided to leave out the output volume control renaming for the AD1986, because 1) I found the name "Master Surround" to be confusing, since "Surround" is used to refer to the rear channels of a multichannel configuration. Also renaming "Headphone" to "Master" makes no sense for the AD1986, since the AD1986 has separate Headphone pins, unlike the AD1888, AD1980 and AD1985 for which the same pins are used for either the Headphone or Surround outputs.
I do plan to revisit output volume control names in the future. The AD1986 uses volume controls somewhat differently than most AC '97 Devices. For example, normally for AC '97 devices, register
0x18controls DAC PCM attenuation for all channels; the AD1986 uses a special "ADI Mode" configuration in which register0x18controls DAC PCM attenuation only for the front channels, with other registers controlling DAC PCM attenuation for the other channels.
Quoted 4 lines
The AD1888, AD1980 and AD1985 can be configured in software to use either the AC '97 Compatibility mode or the ADI Mode. (In ALSA currently they are fixed in ADI Mode.) The AD1986 can use only the ADI Mode.
Yes, these volume controls are confusing indeed...
Takashi
-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your opinions on IT & business topics through brief surveys - and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV