Comment 16 for bug 1251127

Revision history for this message
In , Raymond (superquad-vortex2) wrote :

As pulseaudio did not have any conf file to use "PCM Playback Switch"

better to name the playback switch to Front instead of PCM when the mute is at pin complex of Line Out

/* give some appropriate ctl name prefix for the given line out channel */
static const char *get_line_out_pfx(struct hda_codec *codec, int ch,
        int *index, int ctl_type)
{
 struct hda_gen_spec *spec = codec->spec;
 struct auto_pin_cfg *cfg = &spec->autocfg;
+ struct nid_path *path;
+ hda_nid_t nid;
+
+ if (ctl_type == NID_PATH_MUTE_CTL) {
+ path = snd_hda_get_path_from_idx(codec, spec->out_paths[ch]);
+ nid = path->ctls[ctl_type] & 0x3f;
+ if (get_wcaps_type(get_wcaps(codec, nid)) == AC_WID_PIN)
+ return channel_name[ch];
+ }