|
@@ -373,8 +373,8 @@ int msm_channel_map_get(struct snd_kcontrol *kcontrol,
|
|
{
|
|
{
|
|
struct chmap_pdata *kctl_pdata =
|
|
struct chmap_pdata *kctl_pdata =
|
|
(struct chmap_pdata *)kcontrol->private_data;
|
|
(struct chmap_pdata *)kcontrol->private_data;
|
|
- struct snd_soc_dai *codec_dai = kctl_pdata->dai;
|
|
|
|
- int backend_id = kctl_pdata->id;
|
|
|
|
|
|
+ struct snd_soc_dai *codec_dai = NULL;
|
|
|
|
+ int backend_id = 0;
|
|
uint32_t rx_ch[MAX_PORT], tx_ch[MAX_PORT];
|
|
uint32_t rx_ch[MAX_PORT], tx_ch[MAX_PORT];
|
|
uint32_t rx_ch_cnt = 0, tx_ch_cnt = 0;
|
|
uint32_t rx_ch_cnt = 0, tx_ch_cnt = 0;
|
|
uint32_t *chmap_data = NULL;
|
|
uint32_t *chmap_data = NULL;
|
|
@@ -385,6 +385,9 @@ int msm_channel_map_get(struct snd_kcontrol *kcontrol,
|
|
return -EINVAL;
|
|
return -EINVAL;
|
|
}
|
|
}
|
|
|
|
|
|
|
|
+ codec_dai = kctl_pdata->dai;
|
|
|
|
+ backend_id = kctl_pdata->id;
|
|
|
|
+
|
|
ret = snd_soc_dai_get_channel_map(codec_dai,
|
|
ret = snd_soc_dai_get_channel_map(codec_dai,
|
|
&tx_ch_cnt, tx_ch, &rx_ch_cnt, rx_ch);
|
|
&tx_ch_cnt, tx_ch, &rx_ch_cnt, rx_ch);
|
|
if (ret || (tx_ch_cnt == 0 && rx_ch_cnt == 0)) {
|
|
if (ret || (tx_ch_cnt == 0 && rx_ch_cnt == 0)) {
|