aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/sound/soc/intel/avs/topology.c
diff options
context:
space:
mode:
authorCezary Rojewski <cezary.rojewski@intel.com>2023-11-17 13:06:09 +0100
committerTakashi Iwai <tiwai@suse.de>2023-11-27 17:28:53 +0100
commitc93c604e93af7f6085df5b7cad4d96f538ece68d (patch)
treed7d5228d6cdcee259879d4490b61df5eeb622b7c /sound/soc/intel/avs/topology.c
parentALSA: hda: Drop snd_hdac_calc_stream_format() (diff)
downloadwireguard-linux-c93c604e93af7f6085df5b7cad4d96f538ece68d.tar.xz
wireguard-linux-c93c604e93af7f6085df5b7cad4d96f538ece68d.zip
ASoC: Intel: avs: Kill S24_LE format
Eliminate all occurrences of S24_LE within PCM code, both HOST and LINK side. Replace those with MSBITS subformats to allow for granular selection when S32_LE is the format of choice. Acked-by: Mark Brown <broonie@kernel.org> Signed-off-by: Cezary Rojewski <cezary.rojewski@intel.com> Acked-by: Jaroslav Kysela <perex@perex.cz> Link: https://lore.kernel.org/r/20231117120610.1755254-16-cezary.rojewski@intel.com Signed-off-by: Takashi Iwai <tiwai@suse.de>
Diffstat (limited to '')
-rw-r--r--sound/soc/intel/avs/topology.c13
1 files changed, 12 insertions, 1 deletions
diff --git a/sound/soc/intel/avs/topology.c b/sound/soc/intel/avs/topology.c
index c74e9d622e4c..778236d3fd28 100644
--- a/sound/soc/intel/avs/topology.c
+++ b/sound/soc/intel/avs/topology.c
@@ -1514,8 +1514,16 @@ static int avs_dai_load(struct snd_soc_component *comp, int index,
struct snd_soc_dai_driver *dai_drv, struct snd_soc_tplg_pcm *pcm,
struct snd_soc_dai *dai)
{
- if (pcm)
+ u32 fe_subformats = SNDRV_PCM_SUBFMTBIT_MSBITS_20 |
+ SNDRV_PCM_SUBFMTBIT_MSBITS_24 |
+ SNDRV_PCM_SUBFMTBIT_MSBITS_MAX;
+
+ if (pcm) {
dai_drv->ops = &avs_dai_fe_ops;
+ dai_drv->capture.subformats = fe_subformats;
+ dai_drv->playback.subformats = fe_subformats;
+ }
+
return 0;
}
@@ -1534,6 +1542,9 @@ static int avs_link_load(struct snd_soc_component *comp, int index, struct snd_s
/* Open LINK (BE) pipes last and close them first to prevent xruns. */
link->trigger[0] = SND_SOC_DPCM_TRIGGER_PRE;
link->trigger[1] = SND_SOC_DPCM_TRIGGER_PRE;
+ } else {
+ /* Do not ignore codec capabilities. */
+ link->dpcm_merged_format = 1;
}
return 0;