From: Takashi Iwai <tiwai@suse.de>
Date: Fri, 24 Jun 2011 09:27:22 +0000 (+0200)
Subject: ALSA: hda - Use alc_get_pfx_name() for all Realtek codecs
X-Git-Tag: firefly_0821_release~3680^2~4182^2~124^2~74
X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=2e925ddeb90ed13b2908c90c4ec31f17efe84359;p=firefly-linux-kernel-4.4.55.git

ALSA: hda - Use alc_get_pfx_name() for all Realtek codecs

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 7858da5675fe..cb8afdab8349 100644
--- a/sound/pci/hda/patch_realtek.c
+++ b/sound/pci/hda/patch_realtek.c
@@ -7184,12 +7184,8 @@ static int alc260_auto_create_multi_out_ctls(struct alc_spec *spec,
 	nid = cfg->line_out_pins[0];
 	if (nid) {
 		const char *pfx;
-		if (!cfg->speaker_pins[0] && !cfg->hp_pins[0])
-			pfx = "Master";
-		else if (cfg->line_out_type == AUTO_PIN_SPEAKER_OUT)
-			pfx = "Speaker";
-		else
-			pfx = "Front";
+		int index;
+		pfx = alc_get_line_out_pfx(spec, 0, true, &index);
 		err = alc260_add_playback_controls(spec, nid, pfx, &vols);
 		if (err < 0)
 			return err;
@@ -13639,10 +13635,8 @@ static int alc268_auto_create_multi_out_ctls(struct alc_spec *spec,
 	nid = cfg->line_out_pins[0];
 	if (nid) {
 		const char *name;
-		if (cfg->line_out_type == AUTO_PIN_SPEAKER_OUT)
-			name = "Speaker";
-		else
-			name = "Front";
+		int index;
+		name = alc_get_line_out_pfx(spec, 0, true, &index);
 		err = alc268_new_analog_output(spec, nid, name, 0);
 		if (err < 0)
 			return err;
@@ -19871,10 +19865,8 @@ static int alc680_auto_create_multi_out_ctls(struct alc_spec *spec,
 	nid = cfg->line_out_pins[0];
 	if (nid) {
 		const char *name;
-		if (cfg->line_out_type == AUTO_PIN_SPEAKER_OUT)
-			name = "Speaker";
-		else
-			name = "Front";
+		int index;
+		name = alc_get_line_out_pfx(spec, 0, true, &index);
 		err = alc680_new_analog_output(spec, nid, name, 0);
 		if (err < 0)
 			return err;