1 Jun
2022
1 Jun
'22
3 p.m.
- int rx_ch[2] = {1, 0};
Should this be 'const'?
Will fix it.
I am also not clear on the mapping, how does this select the right channel? This selects slot0 and the left channel, what am I missing?
There are two DAC sources ASPRX1 and ASPRX2 which is on slot 0 and slot 1 by default. And the DAC is using ASPRX1 as source. The {1, 0} will setup ASPRX1 to be on slot 1 and ASPRX2 on slot 0 so the amps will be using slot 1 as DAC source.
@@ -134,6 +135,17 @@ static int cs35l41_hw_params(struct
snd_pcm_substream *substream,
ret); return ret; }
/* Setup for R channel Slot: WR and TR */
if (i % 2) {
ret = snd_soc_dai_set_channel_map(codec_dai, 0,
NULL,
ARRAY_SIZE(rx_ch),
rx_ch);
if (ret < 0) {
dev_err(codec_dai->dev, "fail to set channel
map, ret %d\n",
ret);
return ret;
}
}
Should we do this loop for the left channels as well to have an explicit setting?
Will do it in V2 patch.
}
return 0;