Skip to contentSkip to conversation

ALSA: HDA: Create mixers on ALC887

PATCH In review David Henningsson 2 participants 3 messages Nov 19, 2010 – Nov 22, 2010 Sound

lore
Share & tools
lore
#0 lore raw

PATCH 1/3 ALSA: HDA: Create mixers on ALC887

ALC887 does not have any volume control ability on the mixer NIDs, so put the volume controls on the dac NIDs instead. Without this patch, ALC887 users cannot use alsamixer at all.

Signature · 2 lines
David Henningsson, Canonical Ltd.
http://launchpad.net/~diwic
Quoted 1 line

From 2418add610811b5763d96f8811ad5d303516bfa3 Mon Sep 17 00:00:00 2001

From: David Henningsson <[email protected]>
Date: Tue, 9 Nov 2010 14:35:30 +0100
Subject: [PATCH 1/3] ALSA: HDA: Create mixers on ALC887

ALC887 does not have any volume control ability on the mixer NIDs, so put the volume controls on the dac NIDs instead. Without this patch, ALC887 users cannot use alsamixer at all.

---
 sound/pci/hda/patch_realtek.c |   10 ++++++++--
 1 files changed, 8 insertions(+), 2 deletions(-)
sound/pci/hda/patch_realtek.c +8 -2
index 788ac4b..ce4017e 100644
@@ -10816,6 +10816,9 @@ static int alc_auto_add_mic_boost(struct hda_codec *codec)
 	return 0;
 }
 
+static int alc861vd_auto_create_multi_out_ctls(struct alc_spec *spec,
+					     const struct auto_pin_cfg *cfg);
+
 /* almost identical with ALC880 parser... */
 static int alc882_parse_auto_config(struct hda_codec *codec)
 {
@@ -10833,7 +10836,10 @@ static int alc882_parse_auto_config(struct hda_codec *codec)
 	err = alc880_auto_fill_dac_nids(spec, &spec->autocfg);
 	if (err < 0)
 		return err;
-	err = alc880_auto_create_multi_out_ctls(spec, &spec->autocfg);
+	if (codec->vendor_id == 0x10ec0887)
+		err = alc861vd_auto_create_multi_out_ctls(spec, &spec->autocfg);
+	else
+		err = alc880_auto_create_multi_out_ctls(spec, &spec->autocfg);
 	if (err < 0)
 		return err;
 	err = alc880_auto_create_extra_out(spec, spec->autocfg.hp_pins[0],
@@ -16955,7 +16961,7 @@ static void alc861vd_auto_init_analog_input(struct hda_codec *codec)
 #define alc861vd_idx_to_mixer_switch(nid)	((nid) + 0x0c)
 
 /* add playback controls from the parsed DAC table */
-/* Based on ALC880 version. But ALC861VD has separate,
+/* Based on ALC880 version. But ALC861VD and ALC887 have separate,
  * different NIDs for mute/unmute switch and volume control */
 static int alc861vd_auto_create_multi_out_ctls(struct alc_spec *spec,
 					     const struct auto_pin_cfg *cfg)
Signature · 1 line
1.7.1

_______________________________________________
Alsa-devel mailing list
[email protected]
http://mailman.alsa-project.org/mailman/listinfo/alsa-devel

#1 lore raw

At Fri, 19 Nov 2010 10:28:35 +0100,

Quoted 10 lines · David Henningsson
[1 <text/plain; ISO-8859-1 (7bit)>]

ALC887 does not have any volume control ability on the mixer NIDs, so put the volume controls on the dac NIDs instead. Without this patch, ALC887 users cannot use alsamixer at all.

OK, this one seems necessary independently from other patches, so I applied this one now for 2.6.37.

thanks,

Takashi

Quoted 60 lines
Signature · 4 lines
-- 
David Henningsson, Canonical Ltd.
http://launchpad.net/~diwic
[2 0001-Create-mixers-on-ALC887.patch <text/x-patch (7bit)>]
Quoted 1 line

From 2418add610811b5763d96f8811ad5d303516bfa3 Mon Sep 17 00:00:00 2001

From: David Henningsson <[email protected]>
Date: Tue, 9 Nov 2010 14:35:30 +0100
Subject: [PATCH 1/3] ALSA: HDA: Create mixers on ALC887

ALC887 does not have any volume control ability on the mixer NIDs, so put the volume controls on the dac NIDs instead. Without this patch, ALC887 users cannot use alsamixer at all.

---
 sound/pci/hda/patch_realtek.c |   10 ++++++++--
 1 files changed, 8 insertions(+), 2 deletions(-)
sound/pci/hda/patch_realtek.c +8 -2
index 788ac4b..ce4017e 100644
@@ -10816,6 +10816,9 @@ static int alc_auto_add_mic_boost(struct hda_codec *codec)
 	return 0;
 }
 
+static int alc861vd_auto_create_multi_out_ctls(struct alc_spec *spec,
+					     const struct auto_pin_cfg *cfg);
+
 /* almost identical with ALC880 parser... */
 static int alc882_parse_auto_config(struct hda_codec *codec)
 {
@@ -10833,7 +10836,10 @@ static int alc882_parse_auto_config(struct hda_codec *codec)
 	err = alc880_auto_fill_dac_nids(spec, &spec->autocfg);
 	if (err < 0)
 		return err;
-	err = alc880_auto_create_multi_out_ctls(spec, &spec->autocfg);
+	if (codec->vendor_id == 0x10ec0887)
+		err = alc861vd_auto_create_multi_out_ctls(spec, &spec->autocfg);
+	else
+		err = alc880_auto_create_multi_out_ctls(spec, &spec->autocfg);
 	if (err < 0)
 		return err;
 	err = alc880_auto_create_extra_out(spec, spec->autocfg.hp_pins[0],
@@ -16955,7 +16961,7 @@ static void alc861vd_auto_init_analog_input(struct hda_codec *codec)
 #define alc861vd_idx_to_mixer_switch(nid)	((nid) + 0x0c)
 
 /* add playback controls from the parsed DAC table */
-/* Based on ALC880 version. But ALC861VD has separate,
+/* Based on ALC880 version. But ALC861VD and ALC887 have separate,
  * different NIDs for mute/unmute switch and volume control */
 static int alc861vd_auto_create_multi_out_ctls(struct alc_spec *spec,
 					     const struct auto_pin_cfg *cfg)
Signature · 1 line
1.7.1
#2 lore raw

At Mon, 22 Nov 2010 07:52:23 +0100,

Quoted 10 lines · Takashi Iwai

At Fri, 19 Nov 2010 10:28:35 +0100,

Quoted 7 lines · David Henningsson

ALC887 does not have any volume control ability on the mixer NIDs, so put the volume controls on the dac NIDs instead. Without this patch, ALC887 users cannot use alsamixer at all.

Quoted 5 lines
Quoted 2 lines

OK, this one seems necessary independently from other patches, so I applied this one now for 2.6.37.

Now I got a feedback from Realtek that it's actually a typo, calling patch_alc882() wrongly for ALC887* variants.

The right fix patch is below. So I reverted your patch.

thanks,

Takashi

===

Quoted 1 line

From 01e0f1378c47947b825eac05c98697ab1be1c86f Mon Sep 17 00:00:00 2001

From: Kailang Yang <[email protected]>
Date: Mon, 22 Nov 2010 10:59:36 +0100
Subject: [PATCH] ALSA: hda - Fixed ALC887-VD initial error

ALC887-VD is like ALC888-VD. It can not be initialized as ALC882.

---
 sound/pci/hda/patch_realtek.c |    7 +++++--
 1 files changed, 5 insertions(+), 2 deletions(-)
sound/pci/hda/patch_realtek.c +5 -2
index 1a7703a..564e6c1 100644
@@ -19420,7 +19420,10 @@ static int patch_alc888(struct hda_codec *codec)
 {
 	if ((alc_read_coef_idx(codec, 0) & 0x00f0)==0x0030){
 		kfree(codec->chip_name);
-		codec->chip_name = kstrdup("ALC888-VD", GFP_KERNEL);
+		if (codec->vendor_id == 0x10ec0887)
+			codec->chip_name = kstrdup("ALC887-VD", GFP_KERNEL);
+		else
+			codec->chip_name = kstrdup("ALC888-VD", GFP_KERNEL);
 		if (!codec->chip_name) {
 			alc_free(codec);
 			return -ENOMEM;
@@ -19910,7 +19913,7 @@ static struct hda_codec_preset snd_hda_preset_realtek[] = {
 	{ .id = 0x10ec0885, .rev = 0x100103, .name = "ALC889A",
 	  .patch = patch_alc882 },
 	{ .id = 0x10ec0885, .name = "ALC885", .patch = patch_alc882 },
-	{ .id = 0x10ec0887, .name = "ALC887", .patch = patch_alc882 },
+	{ .id = 0x10ec0887, .name = "ALC887", .patch = patch_alc888 },
 	{ .id = 0x10ec0888, .rev = 0x100101, .name = "ALC1200",
 	  .patch = patch_alc882 },
 	{ .id = 0x10ec0888, .name = "ALC888", .patch = patch_alc888 },
Signature · 1 line
1.7.3.1