Unverified Commit 3ccbe688 authored by Laurentiu Mihalcea's avatar Laurentiu Mihalcea Committed by Mark Brown
Browse files

ASoC: SOF: compress: Save channel count and sample bytes



The purpose of this change is to enable the saving of the
channel count and sample container bytes format parameters for later use
to compute the timestamps.

This is done when setting the compress stream parameters
(in sof_compr_set_params).

Reviewed-by: default avatarPaul Olaru <paul.olaru@oss.nxp.com>
Reviewed-by: default avatarPierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Signed-off-by: default avatarLaurentiu Mihalcea <laurentiu.mihalcea@nxp.com>
Signed-off-by: default avatarDaniel Baluta <daniel.baluta@nxp.com>
Link: https://lore.kernel.org/r/20220817080529.10864-4-daniel.baluta@oss.nxp.com


Signed-off-by: default avatarMark Brown <broonie@kernel.org>
parent e3091f0a
Loading
Loading
Loading
Loading
+2 −0
Original line number Diff line number Diff line
@@ -238,6 +238,8 @@ static int sof_compr_set_params(struct snd_soc_component *component,
	}

	sstream->sampling_rate = params->codec.sample_rate;
	sstream->channels = params->codec.ch_out;
	sstream->sample_container_bytes = pcm->params.sample_container_bytes;

	spcm->prepared[cstream->direction] = true;

+2 −0
Original line number Diff line number Diff line
@@ -108,6 +108,8 @@ enum sof_debugfs_access_type {
struct sof_compr_stream {
	u64 copied_total;
	u32 sampling_rate;
	u16 channels;
	u16 sample_container_bytes;
};

struct snd_sof_dev;