-
Notifications
You must be signed in to change notification settings - Fork 136
ASoC: SOF: move ops to sof_dev_desc #482
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
ASoC: SOF: move ops to sof_dev_desc #482
Conversation
4b65fe6
to
be2861e
Compare
sound/soc/sof/debug.c
Outdated
@@ -139,7 +139,7 @@ EXPORT_SYMBOL(snd_sof_debugfs_buf_create_item); | |||
|
|||
int snd_sof_dbg_init(struct snd_sof_dev *sdev) | |||
{ | |||
const struct snd_sof_dsp_ops *ops = sdev->ops; | |||
const struct snd_sof_dsp_ops *ops = sdev->pdata->desc->ops; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
also here, too long
sound/soc/sof/intel/hda.c
Outdated
@@ -442,8 +439,8 @@ int hda_dsp_probe(struct snd_sof_dev *sdev) | |||
|
|||
dev_dbg(sdev->dev, "using IPC IRQ %d\n", sdev->ipc_irq); | |||
ret = request_threaded_irq(sdev->ipc_irq, hda_dsp_ipc_irq_handler, | |||
chip->ops->irq_thread, IRQF_SHARED, | |||
"AudioDSP", sdev); | |||
sdev->pdata->desc->ops->irq_thread, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
too long
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The move looks ok but I agree with @RanderWang that the indirections are a bit too hard to follow. Maybe use a macro or static inline to get the ops and arch_ops.
c55c223
to
6aaa5bc
Compare
@plbossart @RanderWang New version is pushed. Could you review it? Thanks. |
@bardliao is this move really necessary? I mean the ops and arch_ops are already abstracted even if they are part of snd_sof_dev. I think it makes sense to leave these as is. |
@ranj063 It is from @plbossart 's suggestion :) #431 (comment) |
snd_sof_dsp_ops and sof_arch_ops are hardware specific stuff, so move them from snd_sof_dev to sof_dev_desc. Signed-off-by: Bard liao <yung-chuan.liao@linux.intel.com>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks mostly good but a couple of misses and enhancements needed. Thanks!
beee056
to
bd71f8b
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ok let's merge. Thanks @bardliao
snd_sof_dsp_ops and sof_arch_ops are hardware specific stuff, so move
them from snd_sof_dev to sof_dev_desc.
Signed-off-by: Bard liao yung-chuan.liao@linux.intel.com