Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 1fe51665 authored by Santosh Mardi's avatar Santosh Mardi
Browse files

ASoC: msm: add support of 44.1KHz on slim0_rx port



Update slim0_rx port to support 44.1KHz SF and put function
to update the sampling frequency.

Change-Id: I1fbb7874c91bc25cbffa1c2750900f76be782245
Signed-off-by: default avatarSantosh Mardi <gsantosh@codeaurora.org>
parent eb4a7be7
Loading
Loading
Loading
Loading
+10 −3
Original line number Diff line number Diff line
/* Copyright (c) 2015, The Linux Foundation. All rights reserved.
/* Copyright (c) 2015-2016, The Linux Foundation. All rights reserved.
 *
 * This program is free software; you can redistribute it and/or modify
 * it under the terms of the GNU General Public License version 2 and
@@ -549,6 +549,10 @@ static int slim0_rx_sample_rate_get(struct snd_kcontrol *kcontrol,
	int sample_rate_val = 0;

	switch (slim0_rx_sample_rate) {
	case SAMPLING_RATE_44P1KHZ:
		sample_rate_val = 3;
		break;

	case SAMPLING_RATE_192KHZ:
		sample_rate_val = 2;
		break;
@@ -577,6 +581,9 @@ static int slim0_rx_sample_rate_put(struct snd_kcontrol *kcontrol,
			ucontrol->value.integer.value[0]);

	switch (ucontrol->value.integer.value[0]) {
	case 3:
		slim0_rx_sample_rate = SAMPLING_RATE_44P1KHZ;
		break;
	case 2:
		slim0_rx_sample_rate = SAMPLING_RATE_192KHZ;
		break;
@@ -870,7 +877,7 @@ static const char *const slim0_tx_ch_text[] = {"One", "Two", "Three", "Four",
static const char *const vi_feed_ch_text[] = {"One", "Two"};
static char const *rx_bit_format_text[] = {"S16_LE", "S24_LE"};
static char const *slim0_rx_sample_rate_text[] = {"KHZ_48", "KHZ_96",
					"KHZ_192"};
	"KHZ_192", "KHZ_44P1"};
static const char *const slim5_rx_ch_text[] = {"One", "Two"};
static char const *slim5_rx_sample_rate_text[] = {"KHZ_48", "KHZ_96",
	"KHZ_192", "KHZ_44P1"};
@@ -881,7 +888,7 @@ static const struct soc_enum msm_snd_enum[] = {
	SOC_ENUM_SINGLE_EXT(2, slim0_rx_ch_text),
	SOC_ENUM_SINGLE_EXT(8, slim0_tx_ch_text),
	SOC_ENUM_SINGLE_EXT(2, rx_bit_format_text),
	SOC_ENUM_SINGLE_EXT(3, slim0_rx_sample_rate_text),
	SOC_ENUM_SINGLE_EXT(4, slim0_rx_sample_rate_text),
	SOC_ENUM_SINGLE_EXT(2, vi_feed_ch_text),
	SOC_ENUM_SINGLE_EXT(4, slim5_rx_sample_rate_text),
	SOC_ENUM_SINGLE_EXT(2, slim5_rx_bit_format_text),