ASoC: amd: acp: store the pdm stream channel mask
authorSyed Saba Kareem <Syed.SabaKareem@amd.com>
Mon, 26 Jun 2023 13:55:12 +0000 (19:25 +0530)
committerMark Brown <broonie@kernel.org>
Sun, 9 Jul 2023 21:47:39 +0000 (22:47 +0100)
Store the pdm stream channel mask, it will be used during system
level resume.

Signed-off-by: Syed Saba Kareem <Syed.SabaKareem@amd.com>
Link: https://lore.kernel.org/r/20230626135515.1252063-9-Syed.SabaKareem@amd.com
Signed-off-by: Mark Brown <broonie@kernel.org>
sound/soc/amd/acp/acp-pdm.c
sound/soc/amd/acp/amd.h

index f8030b7..2833d2b 100644 (file)
@@ -135,6 +135,7 @@ static int acp_dmic_hwparams(struct snd_pcm_substream *substream,
                return -EINVAL;
        }
 
+       adata->ch_mask = ch_mask;
        if (params_format(hwparams) != SNDRV_PCM_FORMAT_S32_LE) {
                dev_err(dai->dev, "Invalid format:%d\n", params_format(hwparams));
                return -EINVAL;
index 42bf6b9..085f3de 100644 (file)
@@ -164,6 +164,7 @@ struct acp_dev_data {
        u32 lrclk_div;
 
        struct acp_resource *rsrc;
+       u32 ch_mask;
        u32 tdm_tx_fmt[3];
        u32 tdm_rx_fmt[3];
        u32 xfer_tx_resolution[3];