diff options
author | Takashi Iwai <tiwai@suse.de> | 2010-08-20 03:41:59 -0400 |
---|---|---|
committer | Takashi Iwai <tiwai@suse.de> | 2010-08-20 03:49:18 -0400 |
commit | 4f34760787c3751a3146f0eecdc79c3e97b94962 (patch) | |
tree | 46caa74cf45cbb0635f2b3278b5bee78e5e791d8 /sound/pci | |
parent | 274714f55c023c683a6b2deedfb2209a9457f4ec (diff) |
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>
Diffstat (limited to 'sound/pci')
-rw-r--r-- | sound/pci/hda/patch_hdmi.c | 21 | ||||
-rw-r--r-- | sound/pci/hda/patch_intelhdmi.c | 8 | ||||
-rw-r--r-- | sound/pci/hda/patch_nvhdmi.c | 8 |
3 files changed, 1 insertions, 36 deletions
diff --git a/sound/pci/hda/patch_hdmi.c b/sound/pci/hda/patch_hdmi.c index 2bc0f07cf33f..afd6022a96a7 100644 --- a/sound/pci/hda/patch_hdmi.c +++ b/sound/pci/hda/patch_hdmi.c | |||
@@ -707,8 +707,6 @@ static int hdmi_setup_stream(struct hda_codec *codec, hda_nid_t nid, | |||
707 | u32 stream_tag, int format) | 707 | u32 stream_tag, int format) |
708 | { | 708 | { |
709 | struct hdmi_spec *spec = codec->spec; | 709 | struct hdmi_spec *spec = codec->spec; |
710 | int tag; | ||
711 | int fmt; | ||
712 | int pinctl; | 710 | int pinctl; |
713 | int new_pinctl = 0; | 711 | int new_pinctl = 0; |
714 | int i; | 712 | int i; |
@@ -745,24 +743,7 @@ static int hdmi_setup_stream(struct hda_codec *codec, hda_nid_t nid, | |||
745 | return -EINVAL; | 743 | return -EINVAL; |
746 | } | 744 | } |
747 | 745 | ||
748 | tag = snd_hda_codec_read(codec, nid, 0, AC_VERB_GET_CONV, 0) >> 4; | 746 | snd_hda_codec_setup_stream(codec, nid, stream_tag, 0, format); |
749 | fmt = snd_hda_codec_read(codec, nid, 0, AC_VERB_GET_STREAM_FORMAT, 0); | ||
750 | |||
751 | snd_printdd("hdmi_setup_stream: " | ||
752 | "NID=0x%x, %sstream=0x%x, %sformat=0x%x\n", | ||
753 | nid, | ||
754 | tag == stream_tag ? "" : "new-", | ||
755 | stream_tag, | ||
756 | fmt == format ? "" : "new-", | ||
757 | format); | ||
758 | |||
759 | if (tag != stream_tag) | ||
760 | snd_hda_codec_write(codec, nid, 0, | ||
761 | AC_VERB_SET_CHANNEL_STREAMID, | ||
762 | stream_tag << 4); | ||
763 | if (fmt != format) | ||
764 | snd_hda_codec_write(codec, nid, 0, | ||
765 | AC_VERB_SET_STREAM_FORMAT, format); | ||
766 | return 0; | 747 | return 0; |
767 | } | 748 | } |
768 | 749 | ||
diff --git a/sound/pci/hda/patch_intelhdmi.c b/sound/pci/hda/patch_intelhdmi.c index d382d3c81c0f..36a9b83a6174 100644 --- a/sound/pci/hda/patch_intelhdmi.c +++ b/sound/pci/hda/patch_intelhdmi.c | |||
@@ -69,20 +69,12 @@ static int intel_hdmi_playback_pcm_prepare(struct hda_pcm_stream *hinfo, | |||
69 | return hdmi_setup_stream(codec, hinfo->nid, stream_tag, format); | 69 | return hdmi_setup_stream(codec, hinfo->nid, stream_tag, format); |
70 | } | 70 | } |
71 | 71 | ||
72 | static int intel_hdmi_playback_pcm_cleanup(struct hda_pcm_stream *hinfo, | ||
73 | struct hda_codec *codec, | ||
74 | struct snd_pcm_substream *substream) | ||
75 | { | ||
76 | return 0; | ||
77 | } | ||
78 | |||
79 | static struct hda_pcm_stream intel_hdmi_pcm_playback = { | 72 | static struct hda_pcm_stream intel_hdmi_pcm_playback = { |
80 | .substreams = 1, | 73 | .substreams = 1, |
81 | .channels_min = 2, | 74 | .channels_min = 2, |
82 | .ops = { | 75 | .ops = { |
83 | .open = hdmi_pcm_open, | 76 | .open = hdmi_pcm_open, |
84 | .prepare = intel_hdmi_playback_pcm_prepare, | 77 | .prepare = intel_hdmi_playback_pcm_prepare, |
85 | .cleanup = intel_hdmi_playback_pcm_cleanup, | ||
86 | }, | 78 | }, |
87 | }; | 79 | }; |
88 | 80 | ||
diff --git a/sound/pci/hda/patch_nvhdmi.c b/sound/pci/hda/patch_nvhdmi.c index f636870dc718..69b950d527c3 100644 --- a/sound/pci/hda/patch_nvhdmi.c +++ b/sound/pci/hda/patch_nvhdmi.c | |||
@@ -326,13 +326,6 @@ static int nvhdmi_dig_playback_pcm_prepare_8ch(struct hda_pcm_stream *hinfo, | |||
326 | return 0; | 326 | return 0; |
327 | } | 327 | } |
328 | 328 | ||
329 | static int nvhdmi_playback_pcm_cleanup(struct hda_pcm_stream *hinfo, | ||
330 | struct hda_codec *codec, | ||
331 | struct snd_pcm_substream *substream) | ||
332 | { | ||
333 | return 0; | ||
334 | } | ||
335 | |||
336 | static int nvhdmi_dig_playback_pcm_prepare_2ch(struct hda_pcm_stream *hinfo, | 329 | static int nvhdmi_dig_playback_pcm_prepare_2ch(struct hda_pcm_stream *hinfo, |
337 | struct hda_codec *codec, | 330 | struct hda_codec *codec, |
338 | unsigned int stream_tag, | 331 | unsigned int stream_tag, |
@@ -350,7 +343,6 @@ static struct hda_pcm_stream nvhdmi_pcm_digital_playback_8ch_89 = { | |||
350 | .ops = { | 343 | .ops = { |
351 | .open = hdmi_pcm_open, | 344 | .open = hdmi_pcm_open, |
352 | .prepare = nvhdmi_dig_playback_pcm_prepare_8ch_89, | 345 | .prepare = nvhdmi_dig_playback_pcm_prepare_8ch_89, |
353 | .cleanup = nvhdmi_playback_pcm_cleanup, | ||
354 | }, | 346 | }, |
355 | }; | 347 | }; |
356 | 348 | ||