From 9f3dadb156692e15933a4a97ef659f65151be4a1 Mon Sep 17 00:00:00 2001 From: Takashi Iwai Date: Mon, 10 Apr 2017 17:12:33 +0200 Subject: ALSA: hda - A new flag to enforce prefix to each pin This is a preliminary patch for a smooth multi-codec support, and it introduces a new flag, force_pin_prefix, to struct hda_codec. This flag is used to force to add the pin location prefix to each input pin. For example, when there is only one microphone pin, usually the auto-parser assigns the string "Mic". With this flag on, it'll be like "Front Mic". Also, the creation of "Master" or "PCM" playback volume for a single pin is suppressed, too. Bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id=195305 Signed-off-by: Takashi Iwai --- sound/pci/hda/hda_generic.c | 2 ++ 1 file changed, 2 insertions(+) (limited to 'sound/pci/hda/hda_generic.c') diff --git a/sound/pci/hda/hda_generic.c b/sound/pci/hda/hda_generic.c index e7c8f4f076d5..443832870a44 100644 --- a/sound/pci/hda/hda_generic.c +++ b/sound/pci/hda/hda_generic.c @@ -1125,6 +1125,7 @@ static const char *get_line_out_pfx(struct hda_codec *codec, int ch, *index = 0; if (cfg->line_outs == 1 && !spec->multi_ios && + !codec->force_pin_prefix && !cfg->hp_outs && !cfg->speaker_outs) return spec->vmaster_mute.hook ? "PCM" : "Master"; @@ -1132,6 +1133,7 @@ static const char *get_line_out_pfx(struct hda_codec *codec, int ch, * use it master (or "PCM" if a vmaster hook is present) */ if (spec->multiout.num_dacs == 1 && !spec->mixer_nid && + !codec->force_pin_prefix && !spec->multiout.hp_out_nid[0] && !spec->multiout.extra_out_nid[0]) return spec->vmaster_mute.hook ? "PCM" : "Master"; -- cgit v1.2.1