mirror of
https://github.com/followmsi/android_kernel_google_msm.git
synced 2024-11-06 23:17:41 +00:00
ASoC: msm: update BTSCO rate put function.
The value for the amix command with the numeric strings is the actual value not the order of the string in the array of text so the put function has to be updated to handle it. For example, the following amix comand: amix 'Internal BTSCO SampleRatee' 16000' The value passed from the alsa-lib is not 2, i.e., the 2nd paramater in the command string: static const char *btsco_rate_text[] = {"8000", "16000"}; Instead, it is 16000. CRs-fixed: 364832 Change-Id: Ie7c83a460900b54e2b317e1c77a064efc22e6bcd Signed-off-by: Kuirong Wang <kuirongw@codeaurora.org>
This commit is contained in:
parent
a17d88d954
commit
cdf330f35c
4 changed files with 9 additions and 8 deletions
|
@ -718,10 +718,10 @@ static int msm_btsco_rate_put(struct snd_kcontrol *kcontrol,
|
|||
struct snd_ctl_elem_value *ucontrol)
|
||||
{
|
||||
switch (ucontrol->value.integer.value[0]) {
|
||||
case 0:
|
||||
case 8000:
|
||||
msm_btsco_rate = BTSCO_RATE_8KHZ;
|
||||
break;
|
||||
case 1:
|
||||
case 16000:
|
||||
msm_btsco_rate = BTSCO_RATE_16KHZ;
|
||||
break;
|
||||
default:
|
||||
|
|
|
@ -733,10 +733,10 @@ static int mdm9615_btsco_rate_put(struct snd_kcontrol *kcontrol,
|
|||
struct snd_ctl_elem_value *ucontrol)
|
||||
{
|
||||
switch (ucontrol->value.integer.value[0]) {
|
||||
case 0:
|
||||
case 8000:
|
||||
mdm9615_btsco_rate = SAMPLE_RATE_8KHZ;
|
||||
break;
|
||||
case 1:
|
||||
case 16000:
|
||||
mdm9615_btsco_rate = SAMPLE_RATE_16KHZ;
|
||||
break;
|
||||
default:
|
||||
|
|
|
@ -422,11 +422,12 @@ static int msm8930_btsco_rate_get(struct snd_kcontrol *kcontrol,
|
|||
static int msm8930_btsco_rate_put(struct snd_kcontrol *kcontrol,
|
||||
struct snd_ctl_elem_value *ucontrol)
|
||||
{
|
||||
|
||||
switch (ucontrol->value.integer.value[0]) {
|
||||
case 0:
|
||||
case 8000:
|
||||
msm8930_btsco_rate = BTSCO_RATE_8KHZ;
|
||||
break;
|
||||
case 1:
|
||||
case 16000:
|
||||
msm8930_btsco_rate = BTSCO_RATE_16KHZ;
|
||||
break;
|
||||
default:
|
||||
|
|
|
@ -609,10 +609,10 @@ static int msm8960_btsco_rate_put(struct snd_kcontrol *kcontrol,
|
|||
struct snd_ctl_elem_value *ucontrol)
|
||||
{
|
||||
switch (ucontrol->value.integer.value[0]) {
|
||||
case 0:
|
||||
case 8000:
|
||||
msm8960_btsco_rate = SAMPLE_RATE_8KHZ;
|
||||
break;
|
||||
case 1:
|
||||
case 16000:
|
||||
msm8960_btsco_rate = SAMPLE_RATE_16KHZ;
|
||||
break;
|
||||
default:
|
||||
|
|
Loading…
Reference in a new issue