Commit 39669225 authored by Takashi Iwai's avatar Takashi Iwai

ALSA: hda - Fix regression on ATI HDMI audio

The HDMI/DP audio output on ATI/AMD chips got broken due to the recent
restructuring of chmap.  Fortunately, Daniel Exner could bisect, and
pointed the culprit commit [739ffee9: ALSA: hda - Add hdmi chmap
verb programming ops to chmap object].

This commit moved some ops from hdmi_ops to chmap_ops, and reassigned
the ops in the embedded chmap object in hdmi_spec instead.
Unfortunately, the reassignment of these ops in patch_atihdmi() were
moved into an if block that is performed only for old chips.  Thus, on
newer chips, the generic ops is still used, which doesn't work for
such ATI/AMD chips.

This patch addresses the regression, simply by moving the assignment
of chmap ops to the right place.

Bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id=114981
Fixes: 739ffee9 ('ALSA: hda - Add hdmi chmap verb programming ops to chmap object')
Reported-and-tested-by: default avatarDaniel Exner <dex@dragonslave.de>
Signed-off-by: default avatarTakashi Iwai <tiwai@suse.de>
parent 3231e205
...@@ -3401,6 +3401,9 @@ static int patch_atihdmi(struct hda_codec *codec) ...@@ -3401,6 +3401,9 @@ static int patch_atihdmi(struct hda_codec *codec)
spec->ops.pin_hbr_setup = atihdmi_pin_hbr_setup; spec->ops.pin_hbr_setup = atihdmi_pin_hbr_setup;
spec->ops.setup_stream = atihdmi_setup_stream; spec->ops.setup_stream = atihdmi_setup_stream;
spec->chmap.ops.pin_get_slot_channel = atihdmi_pin_get_slot_channel;
spec->chmap.ops.pin_set_slot_channel = atihdmi_pin_set_slot_channel;
if (!has_amd_full_remap_support(codec)) { if (!has_amd_full_remap_support(codec)) {
/* override to ATI/AMD-specific versions with pairwise mapping */ /* override to ATI/AMD-specific versions with pairwise mapping */
spec->chmap.ops.chmap_cea_alloc_validate_get_type = spec->chmap.ops.chmap_cea_alloc_validate_get_type =
...@@ -3408,10 +3411,6 @@ static int patch_atihdmi(struct hda_codec *codec) ...@@ -3408,10 +3411,6 @@ static int patch_atihdmi(struct hda_codec *codec)
spec->chmap.ops.cea_alloc_to_tlv_chmap = spec->chmap.ops.cea_alloc_to_tlv_chmap =
atihdmi_paired_cea_alloc_to_tlv_chmap; atihdmi_paired_cea_alloc_to_tlv_chmap;
spec->chmap.ops.chmap_validate = atihdmi_paired_chmap_validate; spec->chmap.ops.chmap_validate = atihdmi_paired_chmap_validate;
spec->chmap.ops.pin_get_slot_channel =
atihdmi_pin_get_slot_channel;
spec->chmap.ops.pin_set_slot_channel =
atihdmi_pin_set_slot_channel;
} }
/* ATI/AMD converters do not advertise all of their capabilities */ /* ATI/AMD converters do not advertise all of their capabilities */
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment