ASoC: SOF: ipc4-pcm: Use consistent name for snd_sof_pcm_stream pointer
Throughout the file the pointer for snd_sof_pcm_stream is named either 'stream' or (wrongly) 'spcm' which confuses the reader. Use 'sps' for the pointer name as it is the most common name used in SOF codebase. Signed-off-by: Peter Ujfalusi <peter.ujfalusi@linux.intel.com> Reviewed-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com> Reviewed-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com> Link: https://msgid.link/r/20240409110036.9411-2-peter.ujfalusi@linux.intel.com Signed-off-by: Mark Brown <broonie@kernel.org>
This commit is contained in:
parent
fec50db703
commit
965e49cdf8
|
@ -764,7 +764,7 @@ static int sof_ipc4_pcm_setup(struct snd_sof_dev *sdev, struct snd_sof_pcm *spcm
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
static void sof_ipc4_build_time_info(struct snd_sof_dev *sdev, struct snd_sof_pcm_stream *spcm)
|
static void sof_ipc4_build_time_info(struct snd_sof_dev *sdev, struct snd_sof_pcm_stream *sps)
|
||||||
{
|
{
|
||||||
struct sof_ipc4_copier *host_copier = NULL;
|
struct sof_ipc4_copier *host_copier = NULL;
|
||||||
struct sof_ipc4_copier *dai_copier = NULL;
|
struct sof_ipc4_copier *dai_copier = NULL;
|
||||||
|
@ -775,7 +775,7 @@ static void sof_ipc4_build_time_info(struct snd_sof_dev *sdev, struct snd_sof_pc
|
||||||
int i;
|
int i;
|
||||||
|
|
||||||
/* find host & dai to locate info in memory window */
|
/* find host & dai to locate info in memory window */
|
||||||
for_each_dapm_widgets(spcm->list, i, widget) {
|
for_each_dapm_widgets(sps->list, i, widget) {
|
||||||
struct snd_sof_widget *swidget = widget->dobj.private;
|
struct snd_sof_widget *swidget = widget->dobj.private;
|
||||||
|
|
||||||
if (!swidget)
|
if (!swidget)
|
||||||
|
@ -795,7 +795,7 @@ static void sof_ipc4_build_time_info(struct snd_sof_dev *sdev, struct snd_sof_pc
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
info = spcm->private;
|
info = sps->private;
|
||||||
info->host_copier = host_copier;
|
info->host_copier = host_copier;
|
||||||
info->dai_copier = dai_copier;
|
info->dai_copier = dai_copier;
|
||||||
info->llp_offset = offsetof(struct sof_ipc4_fw_registers, llp_gpdma_reading_slots) +
|
info->llp_offset = offsetof(struct sof_ipc4_fw_registers, llp_gpdma_reading_slots) +
|
||||||
|
@ -864,7 +864,7 @@ static int sof_ipc4_pcm_hw_params(struct snd_soc_component *component,
|
||||||
|
|
||||||
static int sof_ipc4_get_stream_start_offset(struct snd_sof_dev *sdev,
|
static int sof_ipc4_get_stream_start_offset(struct snd_sof_dev *sdev,
|
||||||
struct snd_pcm_substream *substream,
|
struct snd_pcm_substream *substream,
|
||||||
struct snd_sof_pcm_stream *stream,
|
struct snd_sof_pcm_stream *sps,
|
||||||
struct sof_ipc4_timestamp_info *time_info)
|
struct sof_ipc4_timestamp_info *time_info)
|
||||||
{
|
{
|
||||||
struct sof_ipc4_copier *host_copier = time_info->host_copier;
|
struct sof_ipc4_copier *host_copier = time_info->host_copier;
|
||||||
|
@ -918,7 +918,7 @@ static int sof_ipc4_pcm_pointer(struct snd_soc_component *component,
|
||||||
struct sof_ipc4_timestamp_info *time_info;
|
struct sof_ipc4_timestamp_info *time_info;
|
||||||
struct sof_ipc4_llp_reading_slot llp;
|
struct sof_ipc4_llp_reading_slot llp;
|
||||||
snd_pcm_uframes_t head_cnt, tail_cnt;
|
snd_pcm_uframes_t head_cnt, tail_cnt;
|
||||||
struct snd_sof_pcm_stream *stream;
|
struct snd_sof_pcm_stream *sps;
|
||||||
u64 dai_cnt, host_cnt, host_ptr;
|
u64 dai_cnt, host_cnt, host_ptr;
|
||||||
struct snd_sof_pcm *spcm;
|
struct snd_sof_pcm *spcm;
|
||||||
int ret;
|
int ret;
|
||||||
|
@ -927,8 +927,8 @@ static int sof_ipc4_pcm_pointer(struct snd_soc_component *component,
|
||||||
if (!spcm)
|
if (!spcm)
|
||||||
return -EOPNOTSUPP;
|
return -EOPNOTSUPP;
|
||||||
|
|
||||||
stream = &spcm->stream[substream->stream];
|
sps = &spcm->stream[substream->stream];
|
||||||
time_info = stream->private;
|
time_info = sps->private;
|
||||||
if (!time_info)
|
if (!time_info)
|
||||||
return -EOPNOTSUPP;
|
return -EOPNOTSUPP;
|
||||||
|
|
||||||
|
@ -938,7 +938,7 @@ static int sof_ipc4_pcm_pointer(struct snd_soc_component *component,
|
||||||
* the statistics is complete. And it will not change after the first initiailization.
|
* the statistics is complete. And it will not change after the first initiailization.
|
||||||
*/
|
*/
|
||||||
if (time_info->stream_start_offset == SOF_IPC4_INVALID_STREAM_POSITION) {
|
if (time_info->stream_start_offset == SOF_IPC4_INVALID_STREAM_POSITION) {
|
||||||
ret = sof_ipc4_get_stream_start_offset(sdev, substream, stream, time_info);
|
ret = sof_ipc4_get_stream_start_offset(sdev, substream, sps, time_info);
|
||||||
if (ret < 0)
|
if (ret < 0)
|
||||||
return -EOPNOTSUPP;
|
return -EOPNOTSUPP;
|
||||||
}
|
}
|
||||||
|
@ -1030,15 +1030,15 @@ static snd_pcm_sframes_t sof_ipc4_pcm_delay(struct snd_soc_component *component,
|
||||||
{
|
{
|
||||||
struct snd_soc_pcm_runtime *rtd = snd_soc_substream_to_rtd(substream);
|
struct snd_soc_pcm_runtime *rtd = snd_soc_substream_to_rtd(substream);
|
||||||
struct sof_ipc4_timestamp_info *time_info;
|
struct sof_ipc4_timestamp_info *time_info;
|
||||||
struct snd_sof_pcm_stream *stream;
|
struct snd_sof_pcm_stream *sps;
|
||||||
struct snd_sof_pcm *spcm;
|
struct snd_sof_pcm *spcm;
|
||||||
|
|
||||||
spcm = snd_sof_find_spcm_dai(component, rtd);
|
spcm = snd_sof_find_spcm_dai(component, rtd);
|
||||||
if (!spcm)
|
if (!spcm)
|
||||||
return 0;
|
return 0;
|
||||||
|
|
||||||
stream = &spcm->stream[substream->stream];
|
sps = &spcm->stream[substream->stream];
|
||||||
time_info = stream->private;
|
time_info = sps->private;
|
||||||
/*
|
/*
|
||||||
* Report the stored delay value calculated in the pointer callback.
|
* Report the stored delay value calculated in the pointer callback.
|
||||||
* In the unlikely event that the calculation was skipped/aborted, the
|
* In the unlikely event that the calculation was skipped/aborted, the
|
||||||
|
|
Loading…
Reference in New Issue