[alsa-devel] tegra_wm8903 dapm_nc_pins

Stephen Warren swarren at nvidia.com
Wed Oct 19 18:12:46 CEST 2011


Julian Scheel wrote at Wednesday, October 19, 2011 9:29 AM:
> is there any special reason for the dapm_nc_pins being hardcoded into
> tegra_wm8903.c instead of being set through the platform data?
...
> So I would suggest to add an entry to the platform data which contains a
> list of NC-pins which are then set to nc by the tegra_wm8903 driver on
> startup.

I believe the idea was to keep as much as possible of the audio related
information in the audio drivers rather than in board files. The GPIO
IDs are in platform data since the audio driver can't reach into the
mach-tegra gpio_names header since it's not public.

What I'd like to see in the nc_pins case is the DAPM core automatically
perform these calls based on which pins the codec has which aren't
mentioned in card->dapm_routes; I haven't investigated whether that's
actually possible without breaking unrelated boards though.

If you were to move the nc_pins list into platform data, you'd end up
wanting to move the snd_soc_dapm_route tables too, and perhaps even
tegra_wm8903_controls[] and maybe more.

Eventually, I see most of these tables moving into device-tree, with
the only thing hard-coded into tegra_wm8903.c being all the clock and
format setup code.

-- 
nvpublic



More information about the Alsa-devel mailing list