Lines Matching refs:sdev
21 static void hda_dsp_ipc_host_done(struct snd_sof_dev *sdev) in hda_dsp_ipc_host_done() argument
27 snd_sof_dsp_update_bits_forced(sdev, HDA_DSP_BAR, in hda_dsp_ipc_host_done()
33 snd_sof_dsp_update_bits(sdev, HDA_DSP_BAR, in hda_dsp_ipc_host_done()
39 static void hda_dsp_ipc_dsp_done(struct snd_sof_dev *sdev) in hda_dsp_ipc_dsp_done() argument
45 snd_sof_dsp_update_bits_forced(sdev, HDA_DSP_BAR, in hda_dsp_ipc_dsp_done()
51 snd_sof_dsp_update_bits(sdev, HDA_DSP_BAR, in hda_dsp_ipc_dsp_done()
57 int hda_dsp_ipc_send_msg(struct snd_sof_dev *sdev, struct snd_sof_ipc_msg *msg) in hda_dsp_ipc_send_msg() argument
60 sof_mailbox_write(sdev, sdev->host_box.offset, msg->msg_data, in hda_dsp_ipc_send_msg()
62 snd_sof_dsp_write(sdev, HDA_DSP_BAR, HDA_DSP_REG_HIPCI, in hda_dsp_ipc_send_msg()
68 void hda_dsp_ipc_get_reply(struct snd_sof_dev *sdev) in hda_dsp_ipc_get_reply() argument
70 struct snd_sof_ipc_msg *msg = sdev->msg; in hda_dsp_ipc_get_reply()
81 dev_warn(sdev->dev, "unexpected ipc interrupt raised!\n"); in hda_dsp_ipc_get_reply()
101 sof_mailbox_read(sdev, sdev->host_box.offset, &reply, in hda_dsp_ipc_get_reply()
112 dev_err(sdev->dev, "error: reply expected %zu got %u bytes\n", in hda_dsp_ipc_get_reply()
119 sof_mailbox_read(sdev, sdev->host_box.offset, in hda_dsp_ipc_get_reply()
131 struct snd_sof_dev *sdev = context; in hda_dsp_ipc_irq_thread() local
141 hipcie = snd_sof_dsp_read(sdev, HDA_DSP_BAR, in hda_dsp_ipc_irq_thread()
143 hipct = snd_sof_dsp_read(sdev, HDA_DSP_BAR, HDA_DSP_REG_HIPCT); in hda_dsp_ipc_irq_thread()
144 hipci = snd_sof_dsp_read(sdev, HDA_DSP_BAR, HDA_DSP_REG_HIPCI); in hda_dsp_ipc_irq_thread()
145 hipcte = snd_sof_dsp_read(sdev, HDA_DSP_BAR, HDA_DSP_REG_HIPCTE); in hda_dsp_ipc_irq_thread()
152 dev_vdbg(sdev->dev, in hda_dsp_ipc_irq_thread()
157 snd_sof_dsp_update_bits(sdev, HDA_DSP_BAR, in hda_dsp_ipc_irq_thread()
171 spin_lock_irq(&sdev->ipc_lock); in hda_dsp_ipc_irq_thread()
174 hda_dsp_ipc_get_reply(sdev); in hda_dsp_ipc_irq_thread()
175 snd_sof_ipc_reply(sdev, msg); in hda_dsp_ipc_irq_thread()
178 hda_dsp_ipc_dsp_done(sdev); in hda_dsp_ipc_irq_thread()
180 spin_unlock_irq(&sdev->ipc_lock); in hda_dsp_ipc_irq_thread()
190 dev_vdbg(sdev->dev, in hda_dsp_ipc_irq_thread()
195 snd_sof_dsp_update_bits(sdev, HDA_DSP_BAR, in hda_dsp_ipc_irq_thread()
202 snd_sof_dsp_panic(sdev, HDA_DSP_PANIC_OFFSET(msg_ext)); in hda_dsp_ipc_irq_thread()
205 snd_sof_ipc_msgs_rx(sdev); in hda_dsp_ipc_irq_thread()
208 hda_dsp_ipc_host_done(sdev); in hda_dsp_ipc_irq_thread()
217 dev_dbg_ratelimited(sdev->dev, in hda_dsp_ipc_irq_thread()
225 bool hda_dsp_check_ipc_irq(struct snd_sof_dev *sdev) in hda_dsp_check_ipc_irq() argument
231 irq_status = snd_sof_dsp_read(sdev, HDA_DSP_BAR, HDA_DSP_REG_ADSPIS); in hda_dsp_check_ipc_irq()
232 dev_vdbg(sdev->dev, "irq handler: irq_status:0x%x\n", irq_status); in hda_dsp_check_ipc_irq()
246 int hda_dsp_ipc_get_mailbox_offset(struct snd_sof_dev *sdev) in hda_dsp_ipc_get_mailbox_offset() argument
251 int hda_dsp_ipc_get_window_offset(struct snd_sof_dev *sdev, u32 id) in hda_dsp_ipc_get_window_offset() argument
256 void hda_ipc_msg_data(struct snd_sof_dev *sdev, in hda_ipc_msg_data() argument
260 if (!substream || !sdev->stream_box.size) { in hda_ipc_msg_data()
261 sof_mailbox_read(sdev, sdev->dsp_box.offset, p, sz); in hda_ipc_msg_data()
272 sof_mailbox_read(sdev, hda_stream->stream.posn_offset, in hda_ipc_msg_data()
277 int hda_ipc_pcm_params(struct snd_sof_dev *sdev, in hda_ipc_pcm_params() argument
290 if (posn_offset > sdev->stream_box.size || in hda_ipc_pcm_params()
294 hda_stream->stream.posn_offset = sdev->stream_box.offset + posn_offset; in hda_ipc_pcm_params()
296 dev_dbg(sdev->dev, "pcm: stream dir %d, posn mailbox offset is %zu", in hda_ipc_pcm_params()