[alsa-devel] [PATCH v4 0/5] ALSA: jack: Refactoring for jack kctls

David Henningsson david.henningsson at canonical.com
Wed Apr 8 09:20:56 CEST 2015



On 2015-04-07 18:06, Takashi Iwai wrote:
> This would work, yes.  But, I have some uneasy feeling, something not
> well digested...
>
> Ideally, we want a single API for representing both input and kctl
> jacks.

Maybe this is somewhat my fault for steering Yang in that direction. But 
the requirements are somewhat different.

HDA has the phantom jacks, and the exact naming for each kctl requirements.
ASoC has the combination/button requirements, i e one jack can represent 
more than one kctl.

The phantom jack requirement means that the snd_kctl_jack_new API cannot 
be removed straight away; we could move it to be internal to HDA (it's 
not much code anyway), but I don't see a need for that.

But the HDA code can be moved around to look like this:

    if (phantom_jack) {
       snd_kctl_jack_new();
    }
    else {
       snd_jack_new();
       snd_jack_add_new_kctls();
    }

Now the HDA looks more like the ASoC variant. Yang, what do you think 
about that? That would make the API simpler, wouldn't it?

-- 
David Henningsson, Canonical Ltd.
https://launchpad.net/~diwic


More information about the Alsa-devel mailing list