From 6b4f23b79d7b6e68248da8cb8fa1e1575f4cc470 Mon Sep 17 00:00:00 2001 From: afl1 Date: Wed, 6 Mar 2019 21:18:55 +0100 Subject: [PATCH] sound/soc/auge: fix HD audio passthrough Change-Id: Ied7699c596d97803f5d4e01749e514502e47b965 --- sound/soc/amlogic/auge/spdif.c | 2 +- sound/soc/amlogic/common/spdif_info.c | 7 ++++++- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/sound/soc/amlogic/auge/spdif.c b/sound/soc/amlogic/auge/spdif.c index cbdb25000f67..944e00332576 100644 --- a/sound/soc/amlogic/auge/spdif.c +++ b/sound/soc/amlogic/auge/spdif.c @@ -1446,7 +1446,7 @@ static struct snd_soc_dai_driver aml_spdif_dai[] = { .remove = aml_dai_spdif_remove, .playback = { .channels_min = 1, - .channels_max = 2, + .channels_max = 8, .rates = AML_DAI_SPDIF_RATES, .formats = AML_DAI_SPDIF_FORMATS, }, diff --git a/sound/soc/amlogic/common/spdif_info.c b/sound/soc/amlogic/common/spdif_info.c index 87d8619d6fd4..0093d7372d87 100644 --- a/sound/soc/amlogic/common/spdif_info.c +++ b/sound/soc/amlogic/common/spdif_info.c @@ -56,7 +56,6 @@ void spdif_get_channel_status_info( pr_err("Unsupport sample rate\n"); return; } - if (IEC958_mode_codec && IEC958_mode_codec != 9) { if (IEC958_mode_codec == 1) { /* dts, use raw sync-word mode */ @@ -79,6 +78,12 @@ void spdif_get_channel_status_info( chsts->chstat1_l = 0Xe00; chsts->chstat1_r = 0Xe00; } + } else if (IEC958_mode_codec == 8 || IEC958_mode_codec == 7) { + /* DTS-HD MA, TrueHD */ + chsts->chstat0_l = 0x8206; + chsts->chstat0_r = 0x8206; + chsts->chstat1_l = 0x900; + chsts->chstat1_r = 0x900; } else { /* DTS,DD */ if (rate_bit == SNDRV_PCM_RATE_32000) {