[alsa-devel] Using HDA on an SoC without PCI
swarren at wwwdotorg.org
Fri Feb 14 19:01:14 CET 2014
On 02/14/2014 10:47 AM, Dylan Reid wrote:
> I'm working on an system with an HDMI codec on an HDA interface, but
> that interface doesn't use PCI. I want to re-use as much of the code
> as possible, but I want to avoid scattering ifdefs all over
I think the relevant APIs stub themselves out when appropriate, so you
can do this all without compile-time ifdefs.
> Would gathering the pci specific functions from hda_intel.c into an
> interface struct of some kind make sense? If azx was probed from pci,
> then a pci interface would be used, if it was a platform driver, then
> the correct interface for the platform would be used. It would add
> some overhead to operations such as azx_writel, but that would be
> measured to make sure it isn't detrimental to performance.
Our downstream trees do have patches to allow the HDA driver to be
instantiated from either PCI or from platform devices. You can find the
code in branch:
e.g. ef8491346266 "ALSA: hda: Add hda platform driver support"
There are many other patches to sound/pci/hda after that. I don't recall
exactly how clean taht first patch was, and probably never saw anything
after it, but it might be a good start...
We've only recently had HDMI support upstream on Tegra, otherwise it's
possible I may have found time to try to upstream those patches before.
Not that I have spare time:-)
More information about the Alsa-devel