Merge "asoc: add multiple sampling rates support for a2dp"
This commit is contained in:
commit
24a9908ba2
1 changed files with 24 additions and 1 deletions
|
@ -404,7 +404,9 @@ static char const *slim_sample_rate_text[] = {"KHZ_8", "KHZ_16",
|
|||
"KHZ_32", "KHZ_44P1", "KHZ_48",
|
||||
"KHZ_88P2", "KHZ_96", "KHZ_176P4",
|
||||
"KHZ_192", "KHZ_352P8", "KHZ_384"};
|
||||
static char const *bt_sample_rate_text[] = {"KHZ_8", "KHZ_16", "KHZ_48"};
|
||||
static char const *bt_sample_rate_text[] = {"KHZ_8", "KHZ_16",
|
||||
"KHZ_44P1", "KHZ_48",
|
||||
"KHZ_88P2", "KHZ_96"};
|
||||
static const char *const usb_ch_text[] = {"One", "Two", "Three", "Four",
|
||||
"Five", "Six", "Seven",
|
||||
"Eight"};
|
||||
|
@ -984,7 +986,16 @@ static int msm_bt_sample_rate_get(struct snd_kcontrol *kcontrol,
|
|||
* value.
|
||||
*/
|
||||
switch (slim_rx_cfg[SLIM_RX_7].sample_rate) {
|
||||
case SAMPLING_RATE_96KHZ:
|
||||
ucontrol->value.integer.value[0] = 5;
|
||||
break;
|
||||
case SAMPLING_RATE_88P2KHZ:
|
||||
ucontrol->value.integer.value[0] = 4;
|
||||
break;
|
||||
case SAMPLING_RATE_48KHZ:
|
||||
ucontrol->value.integer.value[0] = 3;
|
||||
break;
|
||||
case SAMPLING_RATE_44P1KHZ:
|
||||
ucontrol->value.integer.value[0] = 2;
|
||||
break;
|
||||
case SAMPLING_RATE_16KHZ:
|
||||
|
@ -1010,9 +1021,21 @@ static int msm_bt_sample_rate_put(struct snd_kcontrol *kcontrol,
|
|||
slim_tx_cfg[SLIM_TX_7].sample_rate = SAMPLING_RATE_16KHZ;
|
||||
break;
|
||||
case 2:
|
||||
slim_rx_cfg[SLIM_RX_7].sample_rate = SAMPLING_RATE_44P1KHZ;
|
||||
slim_tx_cfg[SLIM_TX_7].sample_rate = SAMPLING_RATE_44P1KHZ;
|
||||
break;
|
||||
case 3:
|
||||
slim_rx_cfg[SLIM_RX_7].sample_rate = SAMPLING_RATE_48KHZ;
|
||||
slim_tx_cfg[SLIM_TX_7].sample_rate = SAMPLING_RATE_48KHZ;
|
||||
break;
|
||||
case 4:
|
||||
slim_rx_cfg[SLIM_RX_7].sample_rate = SAMPLING_RATE_88P2KHZ;
|
||||
slim_tx_cfg[SLIM_TX_7].sample_rate = SAMPLING_RATE_88P2KHZ;
|
||||
break;
|
||||
case 5:
|
||||
slim_rx_cfg[SLIM_RX_7].sample_rate = SAMPLING_RATE_96KHZ;
|
||||
slim_tx_cfg[SLIM_TX_7].sample_rate = SAMPLING_RATE_96KHZ;
|
||||
break;
|
||||
case 0:
|
||||
default:
|
||||
slim_rx_cfg[SLIM_RX_7].sample_rate = SAMPLING_RATE_8KHZ;
|
||||
|
|
Loading…
Add table
Reference in a new issue