[alsa-devel] [PATCH v4 1/7] ASoC: hda - add ASoC HDA codec match function

Mark Brown broonie at kernel.org
Fri May 22 19:41:06 CEST 2015


On Fri, May 22, 2015 at 03:35:03PM +0200, Takashi Iwai wrote:
> Mark Brown wrote:

> > I'm sorry but I still don't entirely understand what this is supposed to
> > do.  It *looks* like it's trying to create a bus for HDA with this:

> > but it's not actually defining a driver model bus type (though it does
> > use driver_register()) and I'd expect the bus type to be provided by the
> > generic HDA code.  Looking (fairly quickly admittedly) at the HDA code
> > it's not entirely obvious how it all fits together and the changelog for
> > that just talks about moving code around.

> The bus is already defined in sound/hda.  There, the actual binding is

I see there's a bus_type defined there but this is calling raw
device_register() and providing a match function so it seems like
there's something missing or an abstraction problem.  I'd expect a bus
to be providing things like match functions and bus specific
registration functions.

This is all setting off alarm bells, both the code and the very
aggressive pushing.

> done in each hda driver specifics, i.e. in sound/soc/hda and
> sound/pci/hda.  It's the way to allow binding completely different
> drivers for the very same PCI ID.

I don't really understand this, sorry.  What impact would HDA bus
implementation have on PCI device drivers (by the time you're
registering HDA devices presumably the PCI device will already be
enumerated)?  

Having two drivers for the same PCI function doesn't sound like an
*obviously* good idea (as we discussed recently) but that's a bit of a
separate thing.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 473 bytes
Desc: Digital signature
URL: <http://mailman.alsa-project.org/pipermail/alsa-devel/attachments/20150522/39559c88/attachment.sig>


More information about the Alsa-devel mailing list