lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20220817080529.10864-4-daniel.baluta@oss.nxp.com>
Date:   Wed, 17 Aug 2022 11:05:28 +0300
From:   Daniel Baluta <daniel.baluta@....nxp.com>
To:     broonie@...nel.org, alsa-devel@...a-project.org
Cc:     linux-kernel@...r.kernel.org, peter.ujfalusi@...ux.intel.com,
        yung-chuan.liao@...ux.intel.com, ranjani.sridharan@...ux.intel.com,
        kai.vehmanen@...ux.intel.com, lgirdwood@...il.com,
        pierre-louis.bossart@...ux.intel.com, daniel.baluta@...il.com,
        laurentiu.mihalcea@....com, Paul Olaru <paul.olaru@....nxp.com>,
        Daniel Baluta <daniel.baluta@....com>
Subject: [PATCH 3/4] ASoC: SOF: compress: Save channel count and sample bytes

From: Laurentiu Mihalcea <laurentiu.mihalcea@....com>

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: Paul Olaru <paul.olaru@....nxp.com>
Reviewed-by: Pierre-Louis Bossart <pierre-louis.bossart@...ux.intel.com>
Signed-off-by: Laurentiu Mihalcea <laurentiu.mihalcea@....com>
Signed-off-by: Daniel Baluta <daniel.baluta@....com>
---
 sound/soc/sof/compress.c | 2 ++
 sound/soc/sof/sof-priv.h | 2 ++
 2 files changed, 4 insertions(+)

diff --git a/sound/soc/sof/compress.c b/sound/soc/sof/compress.c
index e990fa093bb5..ac79b46ce3b9 100644
--- a/sound/soc/sof/compress.c
+++ b/sound/soc/sof/compress.c
@@ -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;
 
diff --git a/sound/soc/sof/sof-priv.h b/sound/soc/sof/sof-priv.h
index 42f112030fb8..33165299a20f 100644
--- a/sound/soc/sof/sof-priv.h
+++ b/sound/soc/sof/sof-priv.h
@@ -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;
-- 
2.27.0

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ