summaryrefslogtreecommitdiffstats
path: root/sound/soc/sof/imx/imx8m.c
diff options
context:
space:
mode:
authorMark Brown <broonie@kernel.org>2021-10-18 14:50:42 +0200
committerMark Brown <broonie@kernel.org>2021-10-18 14:50:42 +0200
commitb8f3b564937c1f3529bc4897cc41c5d95d2cdbe9 (patch)
treeb71ed4906bbe2ca96d68dbf1d6d6f0fe2676f1de /sound/soc/sof/imx/imx8m.c
parentASoC: dt-bindings: rockchip: i2s-tdm: Drop rockchip,cru property (diff)
parentLinux 5.15-rc6 (diff)
downloadlinux-b8f3b564937c1f3529bc4897cc41c5d95d2cdbe9.tar.xz
linux-b8f3b564937c1f3529bc4897cc41c5d95d2cdbe9.zip
Merge tag 'v5.15-rc6' into asoc-5.16
Linux 5.15-rc6
Diffstat (limited to 'sound/soc/sof/imx/imx8m.c')
-rw-r--r--sound/soc/sof/imx/imx8m.c9
1 files changed, 8 insertions, 1 deletions
diff --git a/sound/soc/sof/imx/imx8m.c b/sound/soc/sof/imx/imx8m.c
index ae1b48abbae0..e4618980cf8b 100644
--- a/sound/soc/sof/imx/imx8m.c
+++ b/sound/soc/sof/imx/imx8m.c
@@ -229,7 +229,14 @@ static int imx8m_remove(struct snd_sof_dev *sdev)
/* on i.MX8 there is 1 to 1 match between type and BAR idx */
static int imx8m_get_bar_index(struct snd_sof_dev *sdev, u32 type)
{
- return type;
+ /* Only IRAM and SRAM bars are valid */
+ switch (type) {
+ case SOF_FW_BLK_TYPE_IRAM:
+ case SOF_FW_BLK_TYPE_SRAM:
+ return type;
+ default:
+ return -EINVAL;
+ }
}
static struct snd_soc_dai_driver imx8m_dai[] = {