ASoC: Fixes for v6.15

A couple more small fixes for v6.15, both of which could also easily
 wait until the merge window.
 -----BEGIN PGP SIGNATURE-----
 
 iQEzBAABCgAdFiEEreZoqmdXGLWf4p/qJNaLcl1Uh9AFAmgvQt0ACgkQJNaLcl1U
 h9D5rAf/e5UevlBQtOdWieIljlnoWanFjdmIheMnsnuv+NTpGSmMDH2cM3kHToUM
 UDTzl6HGjLUy+9sVA7i19Bpx2ZdNXepeXa+uha9ktHxrk4QCxUxE2MGE7iltjR30
 6zEtJIllJJk4eLHfe+VNP1Gr5j3+4LKpZZB6A0CwtI5KQw95L11flYUgtn/gGB/t
 NCN5Alv242TCxf/aPAPVr8onU5q1FPBX65wKd7+5gVX30g1jyRMGL2GhN7RP1gk0
 ntTc59VeT8G03tHvzWCCMyEZyHFHNnywYixe7lta17l7nrhydCZy+duVHESFi6YQ
 l4dsE0z0njKIIHXovjwXKjRDnBZFmQ==
 =9e3a
 -----END PGP SIGNATURE-----

Merge tag 'asoc-fix-v6.15-rc7' of https://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound into for-linus

ASoC: Fixes for v6.15

A couple more small fixes for v6.15, both of which could also easily
wait until the merge window.
This commit is contained in:
Takashi Iwai 2025-05-22 20:29:00 +02:00
commit 462e244fab
2 changed files with 27 additions and 0 deletions

View File

@ -464,6 +464,28 @@ static int mca_configure_serdes(struct mca_cluster *cl, int serdes_unit,
return -EINVAL;
}
static int mca_fe_startup(struct snd_pcm_substream *substream,
struct snd_soc_dai *dai)
{
struct mca_cluster *cl = mca_dai_to_cluster(dai);
unsigned int mask, nchannels;
if (cl->tdm_slots) {
if (substream->stream == SNDRV_PCM_STREAM_PLAYBACK)
mask = cl->tdm_tx_mask;
else
mask = cl->tdm_rx_mask;
nchannels = hweight32(mask);
} else {
nchannels = 2;
}
return snd_pcm_hw_constraint_minmax(substream->runtime,
SNDRV_PCM_HW_PARAM_CHANNELS,
1, nchannels);
}
static int mca_fe_set_tdm_slot(struct snd_soc_dai *dai, unsigned int tx_mask,
unsigned int rx_mask, int slots, int slot_width)
{
@ -680,6 +702,7 @@ static int mca_fe_hw_params(struct snd_pcm_substream *substream,
}
static const struct snd_soc_dai_ops mca_fe_ops = {
.startup = mca_fe_startup,
.set_fmt = mca_fe_set_fmt,
.set_bclk_ratio = mca_set_bclk_ratio,
.set_tdm_slot = mca_fe_set_tdm_slot,

View File

@ -91,6 +91,10 @@ static int sdm845_slim_snd_hw_params(struct snd_pcm_substream *substream,
else
ret = snd_soc_dai_set_channel_map(cpu_dai, tx_ch_cnt,
tx_ch, 0, NULL);
if (ret != 0 && ret != -ENOTSUPP) {
dev_err(rtd->dev, "failed to set cpu chan map, err:%d\n", ret);
return ret;
}
}
return 0;