[alsa-devel] [PATCH] ASoC: ams-delta: Let the core to register DAPM widgets/routes and controls

Péter Ujfalusi peter.ujfalusi at ti.com
Mon Oct 10 08:27:51 CEST 2011


Hi Janusz,

On Saturday 08 October 2011 13:47:57 Janusz Krzysztofik wrote:
> On Fri, 7 Oct 2011 at 11:03:19 Peter Ujfalusi wrote:
> > Pass the DAPM widgets/routes and static controls via the
> > snd_soc_card struct to core. In this way the machine driver
> > does not need to handle the DAPM widgets/routes.
> 
> Hi Peter,
> This change really simplifies things by making better use of platform
> provided functionality instead of reimplementing parts of it, but it
> breaks the intentional logic of conditionally enabling card widgets,
> controls and routes. OTOH, the negative condition here is
> tty_register_ldisc() failure, which seems hardly possible in a stable,
> correctly configured kernel. So, if you really think such conditional
> logic is no longer required in a driver which has proven its stability,
> please go on, I've tested your changes, they work for me.

I was a bit hesitant to do this change in the first place.
We can keep the current flow in the ams-delta to be on the safe side.
I'm going to send out another series for the omap platforms soon which will 
keep the error handling logic of ams-delta intact.
 
> Otherwise, I can try to re-factor the driver code, keeping that
> conditional logic, but using it for conditional runtime assignment of
> card->{widgets,routes,controls} instead of conditionally calling
> snd_soc_dapm_{new_controls,add_controls,add_routes}(). What do you
> think?

I don't think it worth the trouble to do this.

--
Péter


More information about the Alsa-devel mailing list