提交 9421f954 编写于 作者: T Takashi Iwai

ALSA: hda - Print multiple out-amp values of pin widgets on Conext codecs

Add a flag to work around the non-standard amp-value handling on
Conexant codecs.
Signed-off-by: NTakashi Iwai <tiwai@suse.de>
上级 3b7523fc
...@@ -793,6 +793,9 @@ struct hda_codec { ...@@ -793,6 +793,9 @@ struct hda_codec {
* status change * status change
* (e.g. Realtek codecs) * (e.g. Realtek codecs)
*/ */
unsigned int pin_amp_workaround:1; /* pin out-amp takes index
* (e.g. Conexant codecs)
*/
#ifdef CONFIG_SND_HDA_POWER_SAVE #ifdef CONFIG_SND_HDA_POWER_SAVE
unsigned int power_on :1; /* current (global) power-state */ unsigned int power_on :1; /* current (global) power-state */
unsigned int power_transition :1; /* power-state in transition */ unsigned int power_transition :1; /* power-state in transition */
......
...@@ -554,8 +554,14 @@ static void print_codec_info(struct snd_info_entry *entry, ...@@ -554,8 +554,14 @@ static void print_codec_info(struct snd_info_entry *entry,
snd_iprintf(buffer, " Amp-Out caps: "); snd_iprintf(buffer, " Amp-Out caps: ");
print_amp_caps(buffer, codec, nid, HDA_OUTPUT); print_amp_caps(buffer, codec, nid, HDA_OUTPUT);
snd_iprintf(buffer, " Amp-Out vals: "); snd_iprintf(buffer, " Amp-Out vals: ");
print_amp_vals(buffer, codec, nid, HDA_OUTPUT, if (wid_type == AC_WID_PIN &&
wid_caps & AC_WCAP_STEREO, 1); codec->pin_amp_workaround)
print_amp_vals(buffer, codec, nid, HDA_OUTPUT,
wid_caps & AC_WCAP_STEREO,
conn_len);
else
print_amp_vals(buffer, codec, nid, HDA_OUTPUT,
wid_caps & AC_WCAP_STEREO, 1);
} }
switch (wid_type) { switch (wid_type) {
......
...@@ -1066,6 +1066,7 @@ static int patch_cxt5045(struct hda_codec *codec) ...@@ -1066,6 +1066,7 @@ static int patch_cxt5045(struct hda_codec *codec)
if (!spec) if (!spec)
return -ENOMEM; return -ENOMEM;
codec->spec = spec; codec->spec = spec;
codec->pin_amp_workaround = 1;
spec->multiout.max_channels = 2; spec->multiout.max_channels = 2;
spec->multiout.num_dacs = ARRAY_SIZE(cxt5045_dac_nids); spec->multiout.num_dacs = ARRAY_SIZE(cxt5045_dac_nids);
...@@ -1501,6 +1502,7 @@ static int patch_cxt5047(struct hda_codec *codec) ...@@ -1501,6 +1502,7 @@ static int patch_cxt5047(struct hda_codec *codec)
if (!spec) if (!spec)
return -ENOMEM; return -ENOMEM;
codec->spec = spec; codec->spec = spec;
codec->pin_amp_workaround = 1;
spec->multiout.max_channels = 2; spec->multiout.max_channels = 2;
spec->multiout.num_dacs = ARRAY_SIZE(cxt5047_dac_nids); spec->multiout.num_dacs = ARRAY_SIZE(cxt5047_dac_nids);
...@@ -1847,6 +1849,7 @@ static int patch_cxt5051(struct hda_codec *codec) ...@@ -1847,6 +1849,7 @@ static int patch_cxt5051(struct hda_codec *codec)
if (!spec) if (!spec)
return -ENOMEM; return -ENOMEM;
codec->spec = spec; codec->spec = spec;
codec->pin_amp_workaround = 1;
codec->patch_ops = conexant_patch_ops; codec->patch_ops = conexant_patch_ops;
codec->patch_ops.init = cxt5051_init; codec->patch_ops.init = cxt5051_init;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册