[alsa-devel] [PATCH 1/4] ASoC: rockchip: add rockchip machine driver

Dylan Reid dgreid at chromium.org
Tue May 19 09:37:58 PDT 2015

On Tue, May 19, 2015 at 4:16 AM, Mark Brown <broonie at kernel.org> wrote:
> On Fri, May 15, 2015 at 10:40:59PM +0200, Lars-Peter Clausen wrote:
>> I think the proper way to support this is come up with the concept of jack
>> detection providers and consumers. A component can register a jack detection
>> provider just like it can register a DAI. And then in the board driver you'd
>> just link the jack detection logic to the jack using the usual approach,
>> which is also used for DAIs (e.g. of node or device name). The core would
>> then take care of calling a enable callback or whatever is required to setup
>> the jack detection logic in the driver.
> Yes, nobody has really cared about it since we started pushing things
> out of the card init into the device level.  We would also need to add a
> way to force microphone biases on for devices where that's not a part of
> the jack detection IP.

Can the jacks can each be an aux_dev?  The jack driver would create
the jack at probe time and register it with the card in aux_dev->init.
cht_bsw_max98090_ti.c is already doing something similar, although all
contained in the machine driver.

If the jack detection circuit is integrated with a full codec, then
the codec driver can also create the jack and register it with the

Then simple-card can have an optional property to specify aux devs.  A
GPIO jack device could handle simple switch-based jack detection.

More information about the Linux-rockchip mailing list