Skip to content

Conversation

bardliao
Copy link
Collaborator

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

@@ -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;

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

also here, too long

@@ -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,

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

too long

Copy link
Member

@plbossart plbossart left a 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.

@bardliao bardliao force-pushed the upstream-struct branch 3 times, most recently from c55c223 to 6aaa5bc Compare December 27, 2018 11:42
@bardliao
Copy link
Collaborator Author

@plbossart @RanderWang New version is pushed. Could you review it? Thanks.

@ranj063
Copy link
Collaborator

ranj063 commented Dec 27, 2018

@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.

@bardliao
Copy link
Collaborator Author

@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>
Copy link
Member

@plbossart plbossart left a 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!

@bardliao bardliao force-pushed the upstream-struct branch 2 times, most recently from beee056 to bd71f8b Compare January 2, 2019 09:50
Copy link
Member

@plbossart plbossart left a 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

@plbossart plbossart merged commit 5931a30 into thesofproject:topic/sof-dev Jan 3, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants