forked from Minki/linux
ALSA: hda - Fix conflict of sticky PCM parameter in HDMI codecs
Intel and Nvidia HDMI codec drivers have own implementations of sticky PCM parameters. Now HD-audio core part already has it, thus both setups conflict. The fix is simply remove the part in patch_intelhdmi.c and patch_nvhdmi.c and simply call snd_hda_codec_setup_stream() as usual. Reported-and-tested-by: Stephen Warren <swarren@nvidia.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
This commit is contained in:
parent
274714f55c
commit
4f34760787
@ -707,8 +707,6 @@ static int hdmi_setup_stream(struct hda_codec *codec, hda_nid_t nid,
|
||||
u32 stream_tag, int format)
|
||||
{
|
||||
struct hdmi_spec *spec = codec->spec;
|
||||
int tag;
|
||||
int fmt;
|
||||
int pinctl;
|
||||
int new_pinctl = 0;
|
||||
int i;
|
||||
@ -745,24 +743,7 @@ static int hdmi_setup_stream(struct hda_codec *codec, hda_nid_t nid,
|
||||
return -EINVAL;
|
||||
}
|
||||
|
||||
tag = snd_hda_codec_read(codec, nid, 0, AC_VERB_GET_CONV, 0) >> 4;
|
||||
fmt = snd_hda_codec_read(codec, nid, 0, AC_VERB_GET_STREAM_FORMAT, 0);
|
||||
|
||||
snd_printdd("hdmi_setup_stream: "
|
||||
"NID=0x%x, %sstream=0x%x, %sformat=0x%x\n",
|
||||
nid,
|
||||
tag == stream_tag ? "" : "new-",
|
||||
stream_tag,
|
||||
fmt == format ? "" : "new-",
|
||||
format);
|
||||
|
||||
if (tag != stream_tag)
|
||||
snd_hda_codec_write(codec, nid, 0,
|
||||
AC_VERB_SET_CHANNEL_STREAMID,
|
||||
stream_tag << 4);
|
||||
if (fmt != format)
|
||||
snd_hda_codec_write(codec, nid, 0,
|
||||
AC_VERB_SET_STREAM_FORMAT, format);
|
||||
snd_hda_codec_setup_stream(codec, nid, stream_tag, 0, format);
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
@ -69,20 +69,12 @@ static int intel_hdmi_playback_pcm_prepare(struct hda_pcm_stream *hinfo,
|
||||
return hdmi_setup_stream(codec, hinfo->nid, stream_tag, format);
|
||||
}
|
||||
|
||||
static int intel_hdmi_playback_pcm_cleanup(struct hda_pcm_stream *hinfo,
|
||||
struct hda_codec *codec,
|
||||
struct snd_pcm_substream *substream)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
||||
static struct hda_pcm_stream intel_hdmi_pcm_playback = {
|
||||
.substreams = 1,
|
||||
.channels_min = 2,
|
||||
.ops = {
|
||||
.open = hdmi_pcm_open,
|
||||
.prepare = intel_hdmi_playback_pcm_prepare,
|
||||
.cleanup = intel_hdmi_playback_pcm_cleanup,
|
||||
},
|
||||
};
|
||||
|
||||
|
@ -326,13 +326,6 @@ static int nvhdmi_dig_playback_pcm_prepare_8ch(struct hda_pcm_stream *hinfo,
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int nvhdmi_playback_pcm_cleanup(struct hda_pcm_stream *hinfo,
|
||||
struct hda_codec *codec,
|
||||
struct snd_pcm_substream *substream)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int nvhdmi_dig_playback_pcm_prepare_2ch(struct hda_pcm_stream *hinfo,
|
||||
struct hda_codec *codec,
|
||||
unsigned int stream_tag,
|
||||
@ -350,7 +343,6 @@ static struct hda_pcm_stream nvhdmi_pcm_digital_playback_8ch_89 = {
|
||||
.ops = {
|
||||
.open = hdmi_pcm_open,
|
||||
.prepare = nvhdmi_dig_playback_pcm_prepare_8ch_89,
|
||||
.cleanup = nvhdmi_playback_pcm_cleanup,
|
||||
},
|
||||
};
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user