Merge "asoc: pineapple: update the proper channel mask for BTFM"

This commit is contained in:
qctecmdr
2024-03-21 10:18:18 -07:00
committed by Gerrit - the friendly Code Review server

View File

@@ -64,6 +64,7 @@
#define WCN_CDC_SLIM_RX_CH_MAX 2
#define WCN_CDC_SLIM_TX_CH_MAX 2
#define WCN_CDC_SLIM_TX_CH_MAX_LITO 3
#define WCN_CDC_SLIM_TX_CH_MAX_FM 3
/* Number of WSAs */
#define MONO_SPEAKER 1
@@ -455,6 +456,23 @@ static int msm_wcn_init(struct snd_soc_pcm_runtime *rtd)
msm_common_dai_link_init(rtd);
return ret;
}
static int msm_wcn_init_btfm(struct snd_soc_pcm_runtime *rtd)
{
unsigned int rx_ch[WCN_CDC_SLIM_RX_CH_MAX] = {157, 158};
unsigned int tx_ch[WCN_CDC_SLIM_TX_CH_MAX_FM] = {159, 160, 161};
struct snd_soc_dai *codec_dai = asoc_rtd_to_codec(rtd, 0);
int ret = 0;
ret = snd_soc_dai_set_channel_map(codec_dai, ARRAY_SIZE(tx_ch),
tx_ch, ARRAY_SIZE(rx_ch), rx_ch);
if (ret)
return ret;
msm_common_dai_link_init(rtd);
return ret;
}
#endif
static struct snd_info_entry *msm_snd_info_create_subdir(struct module *mod,
@@ -633,6 +651,29 @@ static struct snd_soc_dai_link msm_wcn_be_dai_links[] = {
};
static struct snd_soc_dai_link msm_wcn_btfm_be_dai_links[] = {
{
.name = LPASS_BE_SLIMBUS_7_RX,
.stream_name = LPASS_BE_SLIMBUS_7_RX,
.playback_only = 1,
.trigger = {SND_SOC_DPCM_TRIGGER_POST,
SND_SOC_DPCM_TRIGGER_POST},
.init = &msm_wcn_init_btfm,
.ops = &msm_common_be_ops,
/* dai link has playback support */
.ignore_pmdown_time = 1,
.ignore_suspend = 1,
SND_SOC_DAILINK_REG(slimbus_7_rx),
},
{
.name = LPASS_BE_SLIMBUS_7_TX,
.stream_name = LPASS_BE_SLIMBUS_7_TX,
.capture_only = 1,
.trigger = {SND_SOC_DPCM_TRIGGER_POST,
SND_SOC_DPCM_TRIGGER_POST},
.ops = &msm_common_be_ops,
.ignore_suspend = 1,
SND_SOC_DAILINK_REG(slimbus_7_tx),
},
{
.name = LPASS_BE_SLIMBUS_8_TX,
.stream_name = LPASS_BE_SLIMBUS_8_TX,