[PATCH 0/2] Tegra HDA specific fixes
This series has the fix for - 2 Channel swapping issue for Tegra - WAKEEN programming to detect wake events.
Mohan Kumar (2): ALSA: hda: Fix 2 channel swapping for Tegra ALSA: hda/tegra: Program WAKEEN register for Tegra
sound/pci/hda/hda_tegra.c | 7 +++++++ sound/pci/hda/patch_hdmi.c | 5 +++++ 2 files changed, 12 insertions(+)
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 --- sound/pci/hda/patch_hdmi.c | 5 +++++ 1 file changed, 5 insertions(+)
diff --git a/sound/pci/hda/patch_hdmi.c b/sound/pci/hda/patch_hdmi.c index b8c8490e568b..3259d713ace9 100644 --- a/sound/pci/hda/patch_hdmi.c +++ b/sound/pci/hda/patch_hdmi.c @@ -3734,6 +3734,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); @@ -3741,6 +3742,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; }
On Tue, 25 Aug 2020 07:24:14 +0200, Mohan Kumar wrote:
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
Thanks, applied.
Takashi
The WAKEEN bits are used to indicate which bits in the STATESTS register may cause wake event during the codec state change request. Configure the WAKEEN register for the Tegra to detect the wake events.
Signed-off-by: Mohan Kumar mkumard@nvidia.com --- sound/pci/hda/hda_tegra.c | 7 +++++++ 1 file changed, 7 insertions(+)
diff --git a/sound/pci/hda/hda_tegra.c b/sound/pci/hda/hda_tegra.c index c94553bcca88..70164d1428d4 100644 --- a/sound/pci/hda/hda_tegra.c +++ b/sound/pci/hda/hda_tegra.c @@ -179,6 +179,10 @@ static int __maybe_unused hda_tegra_runtime_suspend(struct device *dev) struct hda_tegra *hda = container_of(chip, struct hda_tegra, chip);
if (chip && chip->running) { + /* enable controller wake up event */ + azx_writew(chip, WAKEEN, azx_readw(chip, WAKEEN) | + STATESTS_INT_MASK); + azx_stop_chip(chip); azx_enter_link_reset(chip); } @@ -200,6 +204,9 @@ static int __maybe_unused hda_tegra_runtime_resume(struct device *dev) if (chip && chip->running) { hda_tegra_init(hda); azx_init_chip(chip, 1); + /* disable controller wake up event*/ + azx_writew(chip, WAKEEN, azx_readw(chip, WAKEEN) & + ~STATESTS_INT_MASK); }
return 0;
On Tue, 25 Aug 2020 07:24:15 +0200, Mohan Kumar wrote:
The WAKEEN bits are used to indicate which bits in the STATESTS register may cause wake event during the codec state change request. Configure the WAKEEN register for the Tegra to detect the wake events.
Signed-off-by: Mohan Kumar mkumard@nvidia.com
Thanks, applied.
Takashi
This series has the fix for
- 2 Channel swapping issue for Tegra
- WAKEEN programming to detect wake events.
Mohan Kumar (2): ALSA: hda: Fix 2 channel swapping for Tegra ALSA: hda/tegra: Program WAKEEN register for Tegra
sound/pci/hda/hda_tegra.c | 7 +++++++ sound/pci/hda/patch_hdmi.c | 5 +++++ 2 files changed, 12 insertions(+)
Acked-by: Sameer Pujar spujar@nvidia.com
participants (3)
-
Mohan Kumar
-
Sameer Pujar
-
Takashi Iwai