lkml.org 
[lkml]   [2011]   [Nov]   [1]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
Date
SubjectRE: [PATCH] asoc: tegra: wm8903: Simplify pin disconnect
Taylor Hutt wrote at Tuesday, November 01, 2011 10:26 AM:
> (Note that this patch fails the kernel patch checker because
> the 'M' macro produces an error that it's value should be enclosed
> in parenthesis; this is not actually possible for this use & expansion.)
>
> Detail
>
> This change is a simplification, both in implementation and for
> reasoning about whcih pins are connected and disconnected.
>
> The impetus for the change was the addition of new boards, and the
> difficulty in reasoning about the previous code to disconnect pins.
>
> Now, unless a connection is specified for the current board, the pin
> will be disconnected.
>
> A follow-on change will add the 'asymptote' board.
>
> Testing
>
> Visual inspection from original code.
> Built kernel.

As I mentioned in the ChromeOS review, I don't like this approach.

The main issue is that all the connectivity information is already present
in the ${machine}_audio_maps[] arrays, and this change duplicates it all
in the data-structures inside tegra_wm8903_disconnect_pins().

Instead, I believe a function should be added to the ASoC core that reads
the machine's dapm routes, and does the same thing based on that. Mark
Brown pointed out that this should be an optional utility function that
machine drivers should call, since applying it automatically might cause
issues for some other machines.

The second issue here is that the new code calls machine_is_ventana()
and the equivalent for other machines, and some of those functions will go
away next time Russell updates mach-types and removes entries for boards
that aren't supported with an explicit board file.

--
nvpublic



\
 
 \ /
  Last update: 2011-11-01 18:09    [W:0.140 / U:0.084 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site