Merge "ASoC: msm: Add 44.1Khz and 96 Khz sample rate support for tdm group device"

This commit is contained in:
qctecmdr 2020-08-25 11:21:17 -07:00 committed by Gerrit - the friendly Code Review server
commit 4156bf6e97
2 changed files with 26 additions and 2 deletions

View File

@ -627,7 +627,7 @@ static char const *tdm_ch_text[] = {
static char const *tdm_bit_format_text[] = {"S16_LE", "S24_LE", "S32_LE"};
static char const *tdm_sample_rate_text[] = {"KHZ_8", "KHZ_16", "KHZ_32",
"KHZ_48", "KHZ_176P4",
"KHZ_352P8"};
"KHZ_352P8", "KHZ_44P1", "KHZ_96"};
static const char *const tdm_slot_num_text[] = {"One", "Two", "Four",
"Eight", "Sixteen", "ThirtyTwo"};
static const char *const tdm_slot_width_text[] = {"16", "24", "32"};
@ -1334,6 +1334,12 @@ static int tdm_get_sample_rate(int value)
case 5:
sample_rate = SAMPLING_RATE_352P8KHZ;
break;
case 6:
sample_rate = SAMPLING_RATE_44P1KHZ:
break;
case 7:
sample_rate = SAMPLING_RATE_96KHZ;
break;
default:
sample_rate = SAMPLING_RATE_48KHZ;
break;
@ -1380,6 +1386,12 @@ static int tdm_get_sample_rate_val(int sample_rate)
case SAMPLING_RATE_352P8KHZ:
sample_rate_val = 5;
break;
case SAMPLING_RATE_44P1KHZ:
sample_rate_val = 6;
break;
case SAMPLING_RATE_96KHZ:
sample_rate_val = 7;
break;
default:
sample_rate_val = 3;
break;

View File

@ -631,7 +631,7 @@ static char const *tdm_ch_text[] = {
static char const *tdm_bit_format_text[] = {"S16_LE", "S24_LE", "S32_LE"};
static char const *tdm_sample_rate_text[] = {"KHZ_8", "KHZ_16", "KHZ_32",
"KHZ_48", "KHZ_176P4",
"KHZ_352P8"};
"KHZ_352P8", "KHZ_44P1", "KHZ_96"};
static const char *const tdm_slot_num_text[] = {"One", "Two", "Four",
"Eight", "Sixteen", "ThirtyTwo"};
static const char *const tdm_slot_width_text[] = {"16", "24", "32"};
@ -1338,6 +1338,12 @@ static int tdm_get_sample_rate(int value)
case 5:
sample_rate = SAMPLING_RATE_352P8KHZ;
break;
case 6:
sample_rate = SAMPLING_RATE_44P1KHZ;
break;
case 7:
sample_rate = SAMPLING_RATE_96KHZ;
break;
default:
sample_rate = SAMPLING_RATE_48KHZ;
break;
@ -1384,6 +1390,12 @@ static int tdm_get_sample_rate_val(int sample_rate)
case SAMPLING_RATE_352P8KHZ:
sample_rate_val = 5;
break;
case SAMPLING_RATE_44P1KHZ:
sample_rate_val = 6;
break;
case SAMPLING_RATE_96KHZ:
sample_rate_val = 7;
break;
default:
sample_rate_val = 3;
break;