Patchwork [Maverick,SRU] (pre-stable) Fix alsamixer error for ALC887-VD

login
register
mail settings
Submitter David Henningsson
Date Nov. 29, 2010, 10:08 a.m.
Message ID <4CF37BB4.3000905@canonical.com>
Download mbox | patch
Permalink /patch/73405/
State Accepted
Delegated to: Brad Figg
Headers show

Comments

David Henningsson - Nov. 29, 2010, 10:08 a.m.
SRU Justification:

Impact: Sound is not working for an increasing number of users, so 
that's why I'd like this in the kernel ASAP.

Fix: In linux-2.6, commits 01e0f1378c47947b825eac05c98697ab1be1c86f and 
cc1c452e509aefc28f7ad2deed75bc69d4f915f7.

Testcase: For patch 1, start alsamixer and notice that it does not give 
an error message, but starts successfully. For patch 2, notice that 
there is a Headphone volume control.

BugLink: http://launchpad.net/bugs/682596
Tim Gardner - Nov. 29, 2010, 1:49 p.m.
On 11/29/2010 03:08 AM, David Henningsson wrote:
> SRU Justification:
>
> Impact: Sound is not working for an increasing number of users, so
> that's why I'd like this in the kernel ASAP.
>
> Fix: In linux-2.6, commits 01e0f1378c47947b825eac05c98697ab1be1c86f and
> cc1c452e509aefc28f7ad2deed75bc69d4f915f7.
>
> Testcase: For patch 1, start alsamixer and notice that it does not give
> an error message, but starts successfully. For patch 2, notice that
> there is a Headphone volume control.
>
> BugLink: http://launchpad.net/bugs/682596
>

Acked-by: Tim Gardner <tim.gardner@canonical.com>
Stefan Bader - Nov. 29, 2010, 1:53 p.m.
On 11/29/2010 11:08 AM, David Henningsson wrote:
> SRU Justification:
> 
> Impact: Sound is not working for an increasing number of users, so
> that's why I'd like this in the kernel ASAP.
> 
> Fix: In linux-2.6, commits 01e0f1378c47947b825eac05c98697ab1be1c86f and
> cc1c452e509aefc28f7ad2deed75bc69d4f915f7.
> 
> Testcase: For patch 1, start alsamixer and notice that it does not give
> an error message, but starts successfully. For patch 2, notice that
> there is a Headphone volume control.
> 
> BugLink: http://launchpad.net/bugs/682596
> 

Seems to isolate things well enough. Though patch 2 in particular looks like an
example from the black art of in-comprehensive programming book.

Assuming Takashi knows better.

Acked-by: Stefan Bader <stefan.bader@canonical.com>
Brad Figg - Nov. 29, 2010, 7:06 p.m.
On 11/29/2010 05:53 AM, Stefan Bader wrote:
> On 11/29/2010 11:08 AM, David Henningsson wrote:
>> SRU Justification:
>>
>> Impact: Sound is not working for an increasing number of users, so
>> that's why I'd like this in the kernel ASAP.
>>
>> Fix: In linux-2.6, commits 01e0f1378c47947b825eac05c98697ab1be1c86f and
>> cc1c452e509aefc28f7ad2deed75bc69d4f915f7.
>>
>> Testcase: For patch 1, start alsamixer and notice that it does not give
>> an error message, but starts successfully. For patch 2, notice that
>> there is a Headphone volume control.
>>
>> BugLink: http://launchpad.net/bugs/682596
>>
>
> Seems to isolate things well enough. Though patch 2 in particular looks like an
> example from the black art of in-comprehensive programming book.
>
> Assuming Takashi knows better.
>
> Acked-by: Stefan Bader<stefan.bader@canonical.com>
>

Pulled and pushed to Maverick master-next.

Patch

commit cc1c452e509aefc28f7ad2deed75bc69d4f915f7
Author: David Henningsson <david.henningsson@canonical.com>
Date:   Wed Nov 24 14:17:47 2010 +0100

ALSA: HDA: Add an extra DAC for Realtek ALC887-VD
    
The patch enables ALC887-VD to use the DAC at nid 0x26,
which makes it possible to use this DAC for e g Headphone
volume.

BugLink: http://launchpad.net/bugs/682596
    
Signed-off-by: David Henningsson <david.henningsson@canonical.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>

diff --git a/sound/pci/hda/patch_realtek.c b/sound/pci/hda/patch_realtek.c
index 8f7530f..b0e6b8b 100644
--- a/sound/pci/hda/patch_realtek.c
+++ b/sound/pci/hda/patch_realtek.c
@@ -18997,6 +18997,8 @@  static inline hda_nid_t alc662_mix_to_dac(hda_nid_t nid)
 		return 0x02;
 	else if (nid >= 0x0c && nid <= 0x0e)
 		return nid - 0x0c + 0x02;
+	else if (nid == 0x26) /* ALC887-VD has this DAC too */
+		return 0x25;
 	else
 		return 0;
 }
@@ -19005,7 +19007,7 @@  static inline hda_nid_t alc662_mix_to_dac(hda_nid_t nid)
 static hda_nid_t alc662_dac_to_mix(struct hda_codec *codec, hda_nid_t pin,
 				   hda_nid_t dac)
 {
-	hda_nid_t mix[4];
+	hda_nid_t mix[5];
 	int i, num;
 
 	num = snd_hda_get_connections(codec, pin, mix, ARRAY_SIZE(mix));