summaryrefslogtreecommitdiff
path: root/rust/helpers/io.c
diff options
context:
space:
mode:
authorSeppo Ingalsuo <seppo.ingalsuo@linux.intel.com>2025-08-29 13:53:04 +0300
committerMark Brown <broonie@kernel.org>2025-08-29 13:34:06 +0200
commitc04c2e829649ab8fe5f1cfe5d7cbb34ab0463231 (patch)
treed9b7ccc7b1751a4c978b91afc169f12a542ab84a /rust/helpers/io.c
parent6ad299a9b968e1c63988e2a327295e522cf6bbf5 (diff)
ASoC: SOF: ipc4-topology: Add support for 8-bit formats
This patch enables use of 8-bit unsigned, A-law, and mu-law sample formats with IPC4 SOF. The ipc4-topology.h is updated with IPC4 sample types. The purpose is to convert ALSA types to IPC4 types. The functions of_ipc4_update_hw_params(), sof_ipc4_get_valid_bits(), and new function sof_ipc4_get_sample_type() are updated to handle the sample type conversions. The function sof_ipc4_prepare_copier_module() is updated to set the DMA SCS bit for all non 32 bits sample types. The change to function sof_ipc4_get_valid_bits() returns 8 bits for these ALSA formats. The change to function sof_ipc4_prepare_copier_module() is needed to handle properly all non 32-bit formats with SCS bit set. To support playback with new 8 bits types, the sof_ipc4_init_input_audio_fmt() function is updated to get the sample type and use it in search for copier input pin format. To support capture, the sof_ipc4_init_output_audio_fmt() is updated similarly. Since the function uses separate out_ref_type argument, instead of single parameters struct, the out_ref_type needs to be added to every user of the function. Therefore functions sof_ipc4_prepare_copier_module(), sof_ipc4_prepare_gain_module(), sof_ipc4_prepare_mixer_module(), sof_ipc4_prepare_src_module(), and sof_ipc4_prepare_process_module() are updated to set the out_ref_type. Signed-off-by: Seppo Ingalsuo <seppo.ingalsuo@linux.intel.com> Reviewed-by: Péter Ujfalusi <peter.ujfalusi@linux.intel.com> Reviewed-by: Bard Liao <yung-chuan.liao@linux.intel.com> Reviewed-by: Liam Girdwood <liam.r.girdwood@intel.com> Signed-off-by: Peter Ujfalusi <peter.ujfalusi@linux.intel.com> Message-ID: <20250829105305.31818-3-peter.ujfalusi@linux.intel.com> Signed-off-by: Mark Brown <broonie@kernel.org>
Diffstat (limited to 'rust/helpers/io.c')
0 files changed, 0 insertions, 0 deletions