提交 d29240ce 编写于 作者: T Takashi Iwai 提交者: Jaroslav Kysela

[ALSA] hda-codec - Disable shared stream on AD1986A

AD1986A has a hardware problem that it cannot share a stream with
multiple pins properly.  The problem occurs e.g. when a volume is changed
during playback.
So far, hda-intel driver unconditionally assigns the stream to multiple
output pins in copy-front mode, and this should be avoided for AD1986A
codec.
The original fix patch was by zhejiang <zhe.jiang@intel.com>.
Signed-off-by: NTakashi Iwai <tiwai@suse.de>
Signed-off-by: NJaroslav Kysela <perex@perex.cz>
上级 2ffbb837
...@@ -2485,13 +2485,14 @@ int snd_hda_multi_out_analog_prepare(struct hda_codec *codec, ...@@ -2485,13 +2485,14 @@ int snd_hda_multi_out_analog_prepare(struct hda_codec *codec,
/* front */ /* front */
snd_hda_codec_setup_stream(codec, nids[HDA_FRONT], stream_tag, snd_hda_codec_setup_stream(codec, nids[HDA_FRONT], stream_tag,
0, format); 0, format);
if (mout->hp_nid && mout->hp_nid != nids[HDA_FRONT]) if (!mout->no_share_stream &&
mout->hp_nid && mout->hp_nid != nids[HDA_FRONT])
/* headphone out will just decode front left/right (stereo) */ /* headphone out will just decode front left/right (stereo) */
snd_hda_codec_setup_stream(codec, mout->hp_nid, stream_tag, snd_hda_codec_setup_stream(codec, mout->hp_nid, stream_tag,
0, format); 0, format);
/* extra outputs copied from front */ /* extra outputs copied from front */
for (i = 0; i < ARRAY_SIZE(mout->extra_out_nid); i++) for (i = 0; i < ARRAY_SIZE(mout->extra_out_nid); i++)
if (mout->extra_out_nid[i]) if (!mout->no_share_stream && mout->extra_out_nid[i])
snd_hda_codec_setup_stream(codec, snd_hda_codec_setup_stream(codec,
mout->extra_out_nid[i], mout->extra_out_nid[i],
stream_tag, 0, format); stream_tag, 0, format);
...@@ -2501,7 +2502,7 @@ int snd_hda_multi_out_analog_prepare(struct hda_codec *codec, ...@@ -2501,7 +2502,7 @@ int snd_hda_multi_out_analog_prepare(struct hda_codec *codec,
if (chs >= (i + 1) * 2) /* independent out */ if (chs >= (i + 1) * 2) /* independent out */
snd_hda_codec_setup_stream(codec, nids[i], stream_tag, snd_hda_codec_setup_stream(codec, nids[i], stream_tag,
i * 2, format); i * 2, format);
else /* copy front */ else if (!mout->no_share_stream) /* copy front */
snd_hda_codec_setup_stream(codec, nids[i], stream_tag, snd_hda_codec_setup_stream(codec, nids[i], stream_tag,
0, format); 0, format);
} }
......
...@@ -220,6 +220,7 @@ struct hda_multi_out { ...@@ -220,6 +220,7 @@ struct hda_multi_out {
hda_nid_t dig_out_nid; /* digital out audio widget */ hda_nid_t dig_out_nid; /* digital out audio widget */
int max_channels; /* currently supported analog channels */ int max_channels; /* currently supported analog channels */
int dig_out_used; /* current usage of digital out (HDA_DIG_XXX) */ int dig_out_used; /* current usage of digital out (HDA_DIG_XXX) */
int no_share_stream; /* don't share a stream with multiple pins */
}; };
int snd_hda_multi_out_dig_open(struct hda_codec *codec, int snd_hda_multi_out_dig_open(struct hda_codec *codec,
......
...@@ -957,6 +957,14 @@ static int patch_ad1986a(struct hda_codec *codec) ...@@ -957,6 +957,14 @@ static int patch_ad1986a(struct hda_codec *codec)
break; break;
} }
/* AD1986A has a hardware problem that it can't share a stream
* with multiple output pins. The copy of front to surrounds
* causes noisy or silent outputs at a certain timing, e.g.
* changing the volume.
* So, let's disable the shared stream.
*/
spec->multiout.no_share_stream = 1;
return 0; return 0;
} }
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册