You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Reported by Daniel Baluta.
There is no reason why we need to have an Intel-specific "hda" field in snd_sof_dev
/* DSP HW differentiation */structsnd_sof_pdata*pdata;
conststructsnd_sof_dsp_ops*ops;
structsof_intel_hda_dev*hda; /* for HDA based DSP HW */conststructsof_arch_ops*arch_ops;
We need a better abstraction for other architectures and no references to Intel-specific stuff at the top-level (PCI is admissible since it's not Intel-specific).
@plbossart The sof_intel_hda_dev structure is basically store the hda related data which will be used in sof/intel/hda*.c. I think it is not suitable to be merged in the ops since it is not used for operations. How about moving it to struct snd_sof_pdata?
@bardliao it seems that this structure is already abused to store SPI-related hardware information, so we might as well add something like void *hw_pdata; which is used to store SoC or hardware-stuff.
(and remove the spi-specific fields)
Also if we move the also ops into sof_dev_desc (which is part of snd_sof_pdata) then we have a faily localized set of structures.
You could even make the argument that the sof_arch_ops could be part of the sof_dev_desc, so we'd have all the hardware specific stuff hidden.
@plbossart It sounds a big change. I will send a RFC for moving *hda to struct snd_sof_pdata. And I will move the ops after that. I think @RanderWang is also working on ops. I will align with him.
Activity
bardliao commentedon Dec 17, 2018
@plbossart My idea is to replace the *hda field with a generic void * type field. For example:
And we can convert it to
struct sof_intel_hda_devwhen we use it in sof/intel folder.What do you think?
plbossart commentedon Dec 17, 2018
@bardliao I can't recall why we ned this sof_intel_hda_dev structure in the first place. Isn't this something that can be merged in the ops?
bardliao commentedon Dec 18, 2018
@plbossart The sof_intel_hda_dev structure is basically store the hda related data which will be used in sof/intel/hda*.c. I think it is not suitable to be merged in the ops since it is not used for operations. How about moving it to
struct snd_sof_pdata?plbossart commentedon Dec 18, 2018
@bardliao it seems that this structure is already abused to store SPI-related hardware information, so we might as well add something like void *hw_pdata; which is used to store SoC or hardware-stuff.
(and remove the spi-specific fields)
Also if we move the also ops into sof_dev_desc (which is part of snd_sof_pdata) then we have a faily localized set of structures.
You could even make the argument that the sof_arch_ops could be part of the sof_dev_desc, so we'd have all the hardware specific stuff hidden.
bardliao commentedon Dec 19, 2018
@plbossart It sounds a big change. I will send a RFC for moving *hda to struct snd_sof_pdata. And I will move the ops after that. I think @RanderWang is also working on ops. I will align with him.
block: fix null pointer dereference in blk_mq_rq_timed_out()
mm/page_alloc: change all pageblocks migrate type on coalescing
mm/page_alloc: change all pageblocks migrate type on coalescing