Re: [PATCH 1/2] dt-bindings: add simple-audio-mux binding

From: Alexandre Belloni
Date: Fri Dec 11 2020 - 15:29:04 EST


On 09/12/2020 20:05:45-0600, Rob Herring wrote:
> What's wrong with the generic mux binding and driver(s)?
>

The main issue is that the driver doesn't expose audio routes and so
DAPM can't do its job properly. Also, it is more convenient to have the
control part of the ALSA sound card which is not possible with gpio-mux.

You could argue that we can have simple-audio-mux use the mux subsystem
but we still need a new binding and driver anyway, just as we have
io-channel-mux or i2c-mux. I'm not sure this would be useful but I can
be convinced otherwise.

> > +
> > +properties:
> > + compatible:
> > + const: simple-audio-mux
> > +
> > + mux-gpios:
> > + description: |
> > + GPIOs used to select the input line.
> > +
> > + sound-name-prefix:
> > + $ref: /schemas/types.yaml#/definitions/string
> > + description:
> > + Used as prefix for sink/source names of the component. Must be a
> > + unique string among multiple instances of the same component.
> > +
> > +required:
> > + - compatible
> > + - mux-gpios
> > +
> > +additionalProperties: false
> > +
> > +examples:
> > + - |
> > + mux {
> > + compatible = "simple-audio-mux";
> > + mux-gpios = <&gpio 3 0>;
> > + };
> > --
> > 2.28.0
> >

--
Alexandre Belloni, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com