Skip to content

Upstream: Patch 1/14: core #431

Closed
Closed

Description

@plbossart

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 */
	struct snd_sof_pdata *pdata;
	const struct snd_sof_dsp_ops *ops;
	struct sof_intel_hda_dev *hda;	/* for HDA based DSP HW */
	const struct sof_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).

Activity

  1. bardliao commented on Dec 17, 2018

    @bardliao
    Collaborator

    @plbossart My idea is to replace the *hda field with a generic void * type field. For example:

    -       struct sof_intel_hda_dev *hda;  /* for HDA based DSP HW */
    +       void *dai_dev;
    

    And we can convert it to struct sof_intel_hda_dev when we use it in sof/intel folder.
    What do you think?

  2. plbossart commented on Dec 17, 2018

    @plbossart
    MemberAuthor

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

  3. bardliao commented on Dec 18, 2018

    @bardliao
    Collaborator

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

  4. plbossart commented on Dec 18, 2018

    @plbossart
    MemberAuthor

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

  5. bardliao commented on Dec 19, 2018

    @bardliao
    Collaborator

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions