From: Mark Brown Date: Mon, 18 Oct 2021 12:50:42 +0000 (+0100) Subject: Merge tag 'v5.15-rc6' into asoc-5.16 X-Git-Url: http://git.maquefel.me/?a=commitdiff_plain;h=b8f3b564937c1f3529bc4897cc41c5d95d2cdbe9;p=linux.git Merge tag 'v5.15-rc6' into asoc-5.16 Linux 5.15-rc6 --- b8f3b564937c1f3529bc4897cc41c5d95d2cdbe9 diff --cc sound/soc/sof/imx/imx8.c index 20695fe288cec,7e9723a10d02e..dd59a74480d6a --- a/sound/soc/sof/imx/imx8.c +++ b/sound/soc/sof/imx/imx8.c @@@ -366,9 -365,30 +366,16 @@@ static int imx8_remove(struct snd_sof_d /* on i.MX8 there is 1 to 1 match between type and BAR idx */ static int imx8_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 void imx8_ipc_msg_data(struct snd_sof_dev *sdev, - struct snd_pcm_substream *substream, - void *p, size_t sz) -{ - sof_mailbox_read(sdev, sdev->dsp_box.offset, p, sz); -} - -static int imx8_ipc_pcm_params(struct snd_sof_dev *sdev, - struct snd_pcm_substream *substream, - const struct sof_ipc_pcm_params_reply *reply) -{ - return 0; -} - static struct snd_soc_dai_driver imx8_dai[] = { { .name = "esai0", diff --cc sound/soc/sof/imx/imx8m.c index ae1b48abbae04,892e1482f97fa..e4618980cf8bc --- a/sound/soc/sof/imx/imx8m.c +++ b/sound/soc/sof/imx/imx8m.c @@@ -229,21 -228,31 +229,28 @@@ static int imx8m_remove(struct snd_sof_ /* 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 void imx8m_ipc_msg_data(struct snd_sof_dev *sdev, - struct snd_pcm_substream *substream, - void *p, size_t sz) -{ - sof_mailbox_read(sdev, sdev->dsp_box.offset, p, sz); -} - -static int imx8m_ipc_pcm_params(struct snd_sof_dev *sdev, - struct snd_pcm_substream *substream, - const struct sof_ipc_pcm_params_reply *reply) -{ - return 0; -} - static struct snd_soc_dai_driver imx8m_dai[] = { +{ + .name = "sai1", + .playback = { + .channels_min = 1, + .channels_max = 32, + }, + .capture = { + .channels_min = 1, + .channels_max = 32, + }, +}, { .name = "sai3", .playback = {