[alsa-devel] [PATCH] ASoC: imx-sgtl5000.c: Add support for specifying PDCR_TXRXEN

Markus Pargmann mpa at pengutronix.de
Thu Apr 24 11:32:29 CEST 2014


On Thu, Apr 24, 2014 at 11:09:36AM +0200, David Jander wrote:
> On Thu, 24 Apr 2014 10:46:30 +0200
> Markus Pargmann <mpa at pengutronix.de> wrote:
> 
> > Hi,
> > 
> > On Wed, Apr 23, 2014 at 05:50:18PM +0200, David Jander wrote:
> > > This enables effectively swapping RX/TX pins on the external audio port
> > > 
> > > Signed-off-by: David Jander <david at protonic.nl>
> > > ---
> > >  Documentation/devicetree/bindings/sound/imx-audio-sgtl5000.txt | 4 ++++
> > >  sound/soc/fsl/imx-sgtl5000.c                                   | 5 ++++-
> > >  2 files changed, 8 insertions(+), 1 deletion(-)
> > > 
> > > diff --git
> > > a/Documentation/devicetree/bindings/sound/imx-audio-sgtl5000.txt
> > > b/Documentation/devicetree/bindings/sound/imx-audio-sgtl5000.txt index
> > > e4acdd8..3afea85 100644 ---
> > > a/Documentation/devicetree/bindings/sound/imx-audio-sgtl5000.txt +++
> > > b/Documentation/devicetree/bindings/sound/imx-audio-sgtl5000.txt @@ -29,6
> > > +29,10 @@ Required properties:
> > >  - mux-int-port : The internal port of the i.MX audio muxer (AUDMUX)
> > >  - mux-ext-port : The external port of the i.MX audio muxer
> > >  
> > > +Optional properties:
> > > +- ext-port-txrxen : Flag. Set to swap RX/TX signals on external port (set
> > > the
> > > +  IMX_AUDMUX_V2_PDCR_TXRXEN bit in the PDC register of the external port)
> > > +
> > >  Note: The AUDMUX port numbering should start at 1, which is consistent
> > > with hardware manual.
> > 
> > You could also try to use the simple sound card and use DT properties to
> > setup audmux.
> > 
> > This is a configuration example for the audmux:
> > &audmux {
> >         status = "okay";
> > 
> >         aud4 {
> >                 fsl,audmux-port = <MX31_AUDMUX_PORT4_SSI_PINS_4>;
> >                 fsl,port-config = <
> >                         (IMX_AUDMUX_V2_PTCR_SYN |
> >                                 IMX_AUDMUX_V2_PTCR_TFSDIR |
> >                                 IMX_AUDMUX_V2_PTCR_TFSEL(MX31_AUDMUX_PORT1_SSI0)
> > | IMX_AUDMUX_V2_PTCR_TCLKDIR |
> >                                 IMX_AUDMUX_V2_PTCR_TCSEL(MX31_AUDMUX_PORT1_SSI0))
> >                         IMX_AUDMUX_V2_PDCR_RXDSEL(MX31_AUDMUX_PORT1_SSI0)
> >                 >;
> >         };
> > };
> 
> I tried this, but the glue driver imx-sgtl5000.c changes the port settings to
> its own knowledge.... and that includes hard-coded clearing of the
> IMX_AUDMUX_V2_PDCR_TXRXEN bit.
> 
> How can I avoid the imx-sgtl5000.c driver from clearing the settings I specify
> in the AUDMUX driver?

You can use the simple sound card (sound/soc/generic/simple-card.c). The
sound card properties have to be described in the DT. See
Documentation/devicetree/bindings/sound/simple-card.txt

Regards,

Markus

-- 
Pengutronix e.K.                           |                             |
Industrial Linux Solutions                 | http://www.pengutronix.de/  |
Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-0    |
Amtsgericht Hildesheim, HRA 2686           | Fax:   +49-5121-206917-5555 |
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 836 bytes
Desc: Digital signature
URL: <http://mailman.alsa-project.org/pipermail/alsa-devel/attachments/20140424/1d745df7/attachment.sig>


More information about the Alsa-devel mailing list