ASoC: SOF: mediatek: update SOF driver for mt8186
Merge series from Chunxu Li <chunxu.li@mediatek.com>: In these patches, we update SOF driver for mt8186
This commit is contained in:
commit
fcc245c6f6
|
@ -460,13 +460,36 @@ static int mt8186_get_bar_index(struct snd_sof_dev *sdev, u32 type)
|
|||
return type;
|
||||
}
|
||||
|
||||
static int mt8186_ipc_msg_data(struct snd_sof_dev *sdev,
|
||||
struct snd_pcm_substream *substream,
|
||||
void *p, size_t sz)
|
||||
static struct snd_soc_dai_driver mt8186_dai[] = {
|
||||
{
|
||||
sof_mailbox_read(sdev, sdev->dsp_box.offset, p, sz);
|
||||
return 0;
|
||||
}
|
||||
.name = "SOF_DL1",
|
||||
.playback = {
|
||||
.channels_min = 1,
|
||||
.channels_max = 2,
|
||||
},
|
||||
},
|
||||
{
|
||||
.name = "SOF_DL2",
|
||||
.playback = {
|
||||
.channels_min = 1,
|
||||
.channels_max = 2,
|
||||
},
|
||||
},
|
||||
{
|
||||
.name = "SOF_UL1",
|
||||
.capture = {
|
||||
.channels_min = 1,
|
||||
.channels_max = 2,
|
||||
},
|
||||
},
|
||||
{
|
||||
.name = "SOF_UL2",
|
||||
.capture = {
|
||||
.channels_min = 1,
|
||||
.channels_max = 2,
|
||||
},
|
||||
},
|
||||
};
|
||||
|
||||
/* mt8186 ops */
|
||||
static struct snd_sof_dsp_ops sof_mt8186_ops = {
|
||||
|
@ -481,6 +504,10 @@ static struct snd_sof_dsp_ops sof_mt8186_ops = {
|
|||
.block_read = sof_block_read,
|
||||
.block_write = sof_block_write,
|
||||
|
||||
/* Mailbox IO */
|
||||
.mailbox_read = sof_mailbox_read,
|
||||
.mailbox_write = sof_mailbox_write,
|
||||
|
||||
/* Register IO */
|
||||
.write = sof_io_write,
|
||||
.read = sof_io_read,
|
||||
|
@ -491,18 +518,26 @@ static struct snd_sof_dsp_ops sof_mt8186_ops = {
|
|||
.send_msg = mt8186_send_msg,
|
||||
.get_mailbox_offset = mt8186_get_mailbox_offset,
|
||||
.get_window_offset = mt8186_get_window_offset,
|
||||
.ipc_msg_data = mt8186_ipc_msg_data,
|
||||
.ipc_msg_data = sof_ipc_msg_data,
|
||||
.set_stream_data_offset = sof_set_stream_data_offset,
|
||||
|
||||
/* misc */
|
||||
.get_bar_index = mt8186_get_bar_index,
|
||||
|
||||
/* stream callbacks */
|
||||
.pcm_open = sof_stream_pcm_open,
|
||||
.pcm_close = sof_stream_pcm_close,
|
||||
|
||||
/* firmware loading */
|
||||
.load_firmware = snd_sof_load_firmware_memcpy,
|
||||
|
||||
/* Firmware ops */
|
||||
.dsp_arch_ops = &sof_xtensa_arch_ops,
|
||||
|
||||
/* DAI drivers */
|
||||
.drv = mt8186_dai,
|
||||
.num_drv = ARRAY_SIZE(mt8186_dai),
|
||||
|
||||
/* PM */
|
||||
.suspend = mt8186_dsp_suspend,
|
||||
.resume = mt8186_dsp_resume,
|
||||
|
|
Loading…
Reference in New Issue