summaryrefslogtreecommitdiffstats
path: root/sound/pci
diff options
context:
space:
mode:
authorMohan Kumar <mkumard@nvidia.com>2020-08-25 10:54:14 +0530
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2020-09-17 13:45:24 +0200
commitc2d03591ac5f666ebc6ba9887efaa94162262bcb (patch)
tree10803348541aab33d8ae9cd922329237199df3e2 /sound/pci
parent4ee1769b497fba9dcdc6af249ba73a34decbbbff (diff)
downloadlinux-stable-c2d03591ac5f666ebc6ba9887efaa94162262bcb.tar.gz
linux-stable-c2d03591ac5f666ebc6ba9887efaa94162262bcb.tar.bz2
linux-stable-c2d03591ac5f666ebc6ba9887efaa94162262bcb.zip
ALSA: hda: Fix 2 channel swapping for Tegra
[ Upstream commit 216116eae43963c662eb84729507bad95214ca6b ] The Tegra HDA codec HW implementation has an issue related to not swapping the 2 channel Audio Sample Packet(ASP) channel mapping. Whatever the FL and FR mapping specified the left channel always comes out of left speaker and right channel on right speaker. So add condition to disallow the swapping of FL,FR during the playback. Signed-off-by: Mohan Kumar <mkumard@nvidia.com> Acked-by: Sameer Pujar <spujar@nvidia.com> Link: https://lore.kernel.org/r/20200825052415.20626-2-mkumard@nvidia.com Signed-off-by: Takashi Iwai <tiwai@suse.de> Signed-off-by: Sasha Levin <sashal@kernel.org>
Diffstat (limited to 'sound/pci')
-rw-r--r--sound/pci/hda/patch_hdmi.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/sound/pci/hda/patch_hdmi.c b/sound/pci/hda/patch_hdmi.c
index b8e5f2b19ff8..708efb9b4387 100644
--- a/sound/pci/hda/patch_hdmi.c
+++ b/sound/pci/hda/patch_hdmi.c
@@ -3431,6 +3431,7 @@ static int tegra_hdmi_build_pcms(struct hda_codec *codec)
static int patch_tegra_hdmi(struct hda_codec *codec)
{
+ struct hdmi_spec *spec;
int err;
err = patch_generic_hdmi(codec);
@@ -3438,6 +3439,10 @@ static int patch_tegra_hdmi(struct hda_codec *codec)
return err;
codec->patch_ops.build_pcms = tegra_hdmi_build_pcms;
+ spec = codec->spec;
+ spec->chmap.ops.chmap_cea_alloc_validate_get_type =
+ nvhdmi_chmap_cea_alloc_validate_get_type;
+ spec->chmap.ops.chmap_validate = nvhdmi_chmap_validate;
return 0;
}