Commit c8786ac7 authored by Syed Saba Kareem's avatar Syed Saba Kareem Committed by Mark Brown

ASoC: amd: acp: store xfer_resolution of the stream

Store the 'xfer_resolution' of the stream in private data structure,
it will be used to reprogram the xfer_resolution for the active stream
during system level resume.
Signed-off-by: default avatarSyed Saba Kareem <Syed.SabaKareem@amd.com>
Link: https://lore.kernel.org/r/20230626135515.1252063-7-Syed.SabaKareem@amd.comSigned-off-by: default avatarMark Brown <broonie@kernel.org>
parent 088a4098
...@@ -149,6 +149,7 @@ static int acp_i2s_hwparams(struct snd_pcm_substream *substream, struct snd_pcm_ ...@@ -149,6 +149,7 @@ static int acp_i2s_hwparams(struct snd_pcm_substream *substream, struct snd_pcm_
dev_err(dev, "Invalid dai id %x\n", dai->driver->id); dev_err(dev, "Invalid dai id %x\n", dai->driver->id);
return -EINVAL; return -EINVAL;
} }
adata->xfer_tx_resolution[dai->driver->id - 1] = xfer_resolution;
} else { } else {
switch (dai->driver->id) { switch (dai->driver->id) {
case I2S_BT_INSTANCE: case I2S_BT_INSTANCE:
...@@ -167,6 +168,7 @@ static int acp_i2s_hwparams(struct snd_pcm_substream *substream, struct snd_pcm_ ...@@ -167,6 +168,7 @@ static int acp_i2s_hwparams(struct snd_pcm_substream *substream, struct snd_pcm_
dev_err(dev, "Invalid dai id %x\n", dai->driver->id); dev_err(dev, "Invalid dai id %x\n", dai->driver->id);
return -EINVAL; return -EINVAL;
} }
adata->xfer_rx_resolution[dai->driver->id - 1] = xfer_resolution;
} }
val = readl(adata->acp_base + reg_val); val = readl(adata->acp_base + reg_val);
......
...@@ -166,6 +166,8 @@ struct acp_dev_data { ...@@ -166,6 +166,8 @@ struct acp_dev_data {
struct acp_resource *rsrc; struct acp_resource *rsrc;
u32 tdm_tx_fmt[3]; u32 tdm_tx_fmt[3];
u32 tdm_rx_fmt[3]; u32 tdm_rx_fmt[3];
u32 xfer_tx_resolution[3];
u32 xfer_rx_resolution[3];
}; };
union acp_i2stdm_mstrclkgen { union acp_i2stdm_mstrclkgen {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment