From 3e11dbd71ed3c34c55c02e95d8316a9f6c6d45d1 Mon Sep 17 00:00:00 2001 From: Romed Schur Date: Thu, 4 Jul 2019 10:03:57 +0200 Subject: [PATCH] asoc: qcs405: Add DSD over PCM support for csra66x0 codec Enable DSD over PCM stereo support of QCS405 and csra66x0 codec. Change-Id: Iedc8231d6e19f4959f525395e8b0ebc69746d879 Signed-off-by: Romed Schur --- asoc/qcs405.c | 31 +++++++++++++++++++++++++------ 1 file changed, 25 insertions(+), 6 deletions(-) diff --git a/asoc/qcs405.c b/asoc/qcs405.c index 15fff2aa53..089930eceb 100644 --- a/asoc/qcs405.c +++ b/asoc/qcs405.c @@ -480,7 +480,8 @@ static char const *tdm_sample_rate_text[] = {"KHZ_8", "KHZ_16", "KHZ_32", static const char *const auxpcm_rate_text[] = {"KHZ_8", "KHZ_16"}; static char const *mi2s_rate_text[] = {"KHZ_8", "KHZ_11P025", "KHZ_16", "KHZ_22P05", "KHZ_32", "KHZ_44P1", - "KHZ_48", "KHZ_96", "KHZ_192", "KHZ_384"}; + "KHZ_48", "KHZ_88P2", "KHZ_96", "KHZ_176P4", + "KHZ_192", "KHZ_352P8", "KHZ_384"}; static const char *const mi2s_ch_text[] = { "One", "Two", "Three", "Four", "Five", "Six", "Seven", "Eight", "Nine", "Ten", "Eleven", "Twelve", "Thirteen", @@ -2724,15 +2725,24 @@ static int mi2s_get_sample_rate_val(int sample_rate) case SAMPLING_RATE_48KHZ: sample_rate_val = 6; break; - case SAMPLING_RATE_96KHZ: + case SAMPLING_RATE_88P2KHZ: sample_rate_val = 7; break; - case SAMPLING_RATE_192KHZ: + case SAMPLING_RATE_96KHZ: sample_rate_val = 8; break; - case SAMPLING_RATE_384KHZ: + case SAMPLING_RATE_176P4KHZ: sample_rate_val = 9; break; + case SAMPLING_RATE_192KHZ: + sample_rate_val = 10; + break; + case SAMPLING_RATE_352P8KHZ: + sample_rate_val = 11; + break; + case SAMPLING_RATE_384KHZ: + sample_rate_val = 12; + break; default: sample_rate_val = 6; break; @@ -2767,12 +2777,21 @@ static int mi2s_get_sample_rate(int value) sample_rate = SAMPLING_RATE_48KHZ; break; case 7: - sample_rate = SAMPLING_RATE_96KHZ; + sample_rate = SAMPLING_RATE_88P2KHZ; break; case 8: - sample_rate = SAMPLING_RATE_192KHZ; + sample_rate = SAMPLING_RATE_96KHZ; break; case 9: + sample_rate = SAMPLING_RATE_176P4KHZ; + break; + case 10: + sample_rate = SAMPLING_RATE_192KHZ; + break; + case 11: + sample_rate = SAMPLING_RATE_352P8KHZ; + break; + case 12: sample_rate = SAMPLING_RATE_384KHZ; break; default: