asoc: bolero: Update AIF dai-id to start with value 1

ASoC core assigns dai id value to num_dais if
AIF dai-id passed is 0. Since we have different macros
passing AIF dai-id as 0, they are replaced in ASoC core.
To handle this, update AIF dai-id in respective macros
to start with value 1.

Change-Id: I222c088289292aa226c90710e56a8c94af5615cd
Signed-off-by: Laxminath Kasam <lkasam@codeaurora.org>
This commit is contained in:
Laxminath Kasam 2018-08-09 16:11:17 +05:30
commit 59c7a1de15
4 changed files with 16 additions and 12 deletions

View file

@ -189,7 +189,8 @@ struct rx_swr_ctrl_platform_data {
};
enum {
RX_MACRO_AIF1_PB = 0,
RX_MACRO_AIF_INVALID = 0,
RX_MACRO_AIF1_PB,
RX_MACRO_AIF2_PB,
RX_MACRO_AIF3_PB,
RX_MACRO_AIF4_PB,
@ -1301,16 +1302,16 @@ static int rx_macro_mux_put(struct snd_kcontrol *kcontrol,
switch (rx_port_value) {
case 0:
clear_bit(widget->shift,
&rx_priv->active_ch_mask[aif_rst - 1]);
rx_priv->active_ch_cnt[aif_rst - 1]--;
&rx_priv->active_ch_mask[aif_rst]);
rx_priv->active_ch_cnt[aif_rst]--;
break;
case 1:
case 2:
case 3:
case 4:
set_bit(widget->shift,
&rx_priv->active_ch_mask[rx_port_value - 1]);
rx_priv->active_ch_cnt[rx_port_value - 1]++;
&rx_priv->active_ch_mask[rx_port_value]);
rx_priv->active_ch_cnt[rx_port_value]++;
break;
default:
dev_err(codec->dev,

View file

@ -80,7 +80,8 @@ struct tx_macro_swr_ctrl_platform_data {
};
enum {
TX_MACRO_AIF1_CAP = 0,
TX_MACRO_AIF_INVALID = 0,
TX_MACRO_AIF1_CAP,
TX_MACRO_AIF2_CAP,
TX_MACRO_MAX_DAIS
};

View file

@ -53,7 +53,8 @@ module_param(va_tx_unmute_delay, int, 0664);
MODULE_PARM_DESC(va_tx_unmute_delay, "delay to unmute the tx path");
enum {
VA_MACRO_AIF1_CAP = 0,
VA_MACRO_AIF_INVALID = 0,
VA_MACRO_AIF1_CAP,
VA_MACRO_AIF2_CAP,
VA_MACRO_MAX_DAIS,
};

View file

@ -142,7 +142,8 @@ struct wsa_macro_swr_ctrl_platform_data {
};
enum {
WSA_MACRO_AIF1_PB = 0,
WSA_MACRO_AIF_INVALID = 0,
WSA_MACRO_AIF1_PB,
WSA_MACRO_AIF_MIX1_PB,
WSA_MACRO_AIF_VI,
WSA_MACRO_AIF_ECHO,
@ -1606,14 +1607,14 @@ static int wsa_macro_rx_mux_put(struct snd_kcontrol *kcontrol,
switch (rx_port_value) {
case 0:
clear_bit(bit_input,
&wsa_priv->active_ch_mask[aif_rst - 1]);
wsa_priv->active_ch_cnt[aif_rst - 1]--;
&wsa_priv->active_ch_mask[aif_rst]);
wsa_priv->active_ch_cnt[aif_rst]--;
break;
case 1:
case 2:
set_bit(bit_input,
&wsa_priv->active_ch_mask[rx_port_value - 1]);
wsa_priv->active_ch_cnt[rx_port_value - 1]++;
&wsa_priv->active_ch_mask[rx_port_value]);
wsa_priv->active_ch_cnt[rx_port_value]++;
break;
default:
dev_err(wsa_dev,