]> git.ipfire.org Git - thirdparty/kernel/linux.git/commitdiff
ASoC: SOF: ipc4-topology: Convert FLOAT to S32 during blob selection
authorPeter Ujfalusi <peter.ujfalusi@linux.intel.com>
Mon, 15 Dec 2025 12:06:48 +0000 (14:06 +0200)
committerMark Brown <broonie@kernel.org>
Mon, 15 Dec 2025 14:07:22 +0000 (23:07 +0900)
SSP/DMIC blobs have no support for FLOAT type, they are using S32 on data
bus.

Convert the format from FLOAT_LE to S32_LE to make sure that the correct
format is used within the path.

FLOAT conversion will be done on the host side (or within the path).

Fixes: f7c41911ad74 ("ASoC: SOF: ipc4-topology: Add support for float sample type")
Cc: stable@vger.kernel.org
Signed-off-by: Peter Ujfalusi <peter.ujfalusi@linux.intel.com>
Reviewed-by: Bard Liao <yung-chuan.liao@linux.intel.com>
Reviewed-by: Seppo Ingalsuo <seppo.ingalsuo@linux.intel.com>
Reviewed-by: Kai Vehmanen <kai.vehmanen@linux.intel.com>
Reviewed-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
Link: https://patch.msgid.link/20251215120648.4827-3-peter.ujfalusi@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
sound/soc/sof/ipc4-topology.c

index 47959f182f4be946a4fa4a12a4ada3fcd06d726d..32b628e2fe29b5dab89dbf818b6c15d5b45e5065 100644 (file)
@@ -1843,7 +1843,7 @@ out:
        *len = cfg->size >> 2;
        *dst = (u32 *)cfg->caps;
 
-       if (format_change) {
+       if (format_change || params_format(params) == SNDRV_PCM_FORMAT_FLOAT_LE) {
                /*
                 * Update the params to reflect that different blob was loaded
                 * instead of the requested bit depth (16 -> 32 or 32 -> 16).