On Tue, May 26, 2015 at 03:41:32PM +0200, Takashi Iwai wrote:
Mark Brown wrote:
What are these objects supposed to be then and why does the bus for HDA CODECs know about the differences between them? They're both called HDA CODECs which might lead one to think that they are supposed to represent the same thing.
Both legacy and ASoC drivers contain own codec drivers, but their classes inherit the same HD-audio core object class that is managed by HD-audio core bus. Meanwhile, since the id table is (still) not embedded into HD-audio core object, the match method is still placed in each (asoc and legacy) driver core code.
This is still as clear as mud, sorry - why is the ID table not something that the bus handles? It seems like a core part of what a bus abstracts. Having two completely separate sets of controller and device drivers that can't interact with each other (which seems like what we're ending up with here) seems really worrying and I don't think I've seen any plan for unification either. It's not just the match function stuff by the way, some of the later patches also made me wonder about the mutiple implementations of the bus thing.
I think I'm really not understanding what this bus is supposed to be doing. It's possible that there is something I'm missing here (I imagine there's been some off-list discussions of this) but right now what I'm seeing is that either the bus is not yet at a point where it abstracts enough to really be a bus (it's not clear to me how something would use the bus) or the existing HDA code has been converted to use the new bus before we're ready to do that.
What you all seem to be saying is that the existing code for HDA is too fragile to touch much so we don't want to move much of its functionality to the new bus yet. I can believe that but I think I'd be a lot happier if we were handling that by having the existing HDA code override bus functionality rather than by implementing key bus functionality in random places. It feels like trying to use the bus now is adding technical debt.