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()
99 sof_mailbox_read(sdev, sdev->host_box.offset, &reply, in hda_dsp_ipc_get_reply()
108 dev_err(sdev->dev, "error: reply expected %zu got %u bytes\n", in hda_dsp_ipc_get_reply()
115 sof_mailbox_read(sdev, sdev->host_box.offset, in hda_dsp_ipc_get_reply()
133 struct snd_sof_dev *sdev = context; in hda_dsp_ipc_irq_thread() local
143 hipcie = snd_sof_dsp_read(sdev, HDA_DSP_BAR, in hda_dsp_ipc_irq_thread()
145 hipct = snd_sof_dsp_read(sdev, HDA_DSP_BAR, HDA_DSP_REG_HIPCT); in hda_dsp_ipc_irq_thread()
146 hipci = snd_sof_dsp_read(sdev, HDA_DSP_BAR, HDA_DSP_REG_HIPCI); in hda_dsp_ipc_irq_thread()
147 hipcte = snd_sof_dsp_read(sdev, HDA_DSP_BAR, HDA_DSP_REG_HIPCTE); in hda_dsp_ipc_irq_thread()
154 dev_vdbg(sdev->dev, in hda_dsp_ipc_irq_thread()
159 snd_sof_dsp_update_bits(sdev, HDA_DSP_BAR, in hda_dsp_ipc_irq_thread()
173 spin_lock_irq(&sdev->ipc_lock); in hda_dsp_ipc_irq_thread()
177 hda_dsp_ipc_get_reply(sdev); in hda_dsp_ipc_irq_thread()
178 snd_sof_ipc_reply(sdev, msg); in hda_dsp_ipc_irq_thread()
182 if (sdev->code_loading) { in hda_dsp_ipc_irq_thread()
183 sdev->code_loading = 0; in hda_dsp_ipc_irq_thread()
184 wake_up(&sdev->waitq); in hda_dsp_ipc_irq_thread()
188 hda_dsp_ipc_dsp_done(sdev); in hda_dsp_ipc_irq_thread()
190 spin_unlock_irq(&sdev->ipc_lock); in hda_dsp_ipc_irq_thread()
200 dev_vdbg(sdev->dev, in hda_dsp_ipc_irq_thread()
205 snd_sof_dsp_update_bits(sdev, HDA_DSP_BAR, in hda_dsp_ipc_irq_thread()
212 snd_sof_dsp_panic(sdev, HDA_DSP_PANIC_OFFSET(msg_ext)); in hda_dsp_ipc_irq_thread()
215 snd_sof_ipc_msgs_rx(sdev); in hda_dsp_ipc_irq_thread()
218 hda_dsp_ipc_host_done(sdev); in hda_dsp_ipc_irq_thread()
227 dev_dbg_ratelimited(sdev->dev, in hda_dsp_ipc_irq_thread()
232 snd_sof_dsp_update_bits(sdev, HDA_DSP_BAR, HDA_DSP_REG_ADSPIC, in hda_dsp_ipc_irq_thread()
241 struct snd_sof_dev *sdev = context; in hda_dsp_ipc_irq_handler() local
245 spin_lock(&sdev->hw_lock); in hda_dsp_ipc_irq_handler()
248 irq_status = snd_sof_dsp_read(sdev, HDA_DSP_BAR, HDA_DSP_REG_ADSPIS); in hda_dsp_ipc_irq_handler()
249 dev_vdbg(sdev->dev, "irq handler: irq_status:0x%x\n", irq_status); in hda_dsp_ipc_irq_handler()
258 snd_sof_dsp_update_bits_unlocked(sdev, HDA_DSP_BAR, in hda_dsp_ipc_irq_handler()
265 spin_unlock(&sdev->hw_lock); in hda_dsp_ipc_irq_handler()
269 int hda_dsp_ipc_get_mailbox_offset(struct snd_sof_dev *sdev) in hda_dsp_ipc_get_mailbox_offset() argument
274 int hda_dsp_ipc_get_window_offset(struct snd_sof_dev *sdev, u32 id) in hda_dsp_ipc_get_window_offset() argument
279 void hda_ipc_msg_data(struct snd_sof_dev *sdev, in hda_ipc_msg_data() argument
283 if (!substream || !sdev->stream_box.size) { in hda_ipc_msg_data()
284 sof_mailbox_read(sdev, sdev->dsp_box.offset, p, sz); in hda_ipc_msg_data()
295 sof_mailbox_read(sdev, hda_stream->stream.posn_offset, in hda_ipc_msg_data()
300 int hda_ipc_pcm_params(struct snd_sof_dev *sdev, in hda_ipc_pcm_params() argument
313 if (posn_offset > sdev->stream_box.size || in hda_ipc_pcm_params()
317 hda_stream->stream.posn_offset = sdev->stream_box.offset + posn_offset; in hda_ipc_pcm_params()
319 dev_dbg(sdev->dev, "pcm: stream dir %d, posn mailbox offset is %zu", in hda_ipc_pcm_params()