lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAJiuCcdrQ64jC8UH1eDKKhFdcOtk=bkWTAzoYOQ1ut3He+j2GQ@mail.gmail.com>
Date:   Mon, 15 Apr 2019 18:30:10 +0200
From:   Clément Péron <peron.clem@...il.com>
To:     Maxime Ripard <maxime.ripard@...tlin.com>
Cc:     Rob Herring <robh+dt@...nel.org>, Chen-Yu Tsai <wens@...e.org>,
        Icenowy Zheng <icenowy@...c.io>,
        Jagan Teki <jagan@...rulasolutions.com>,
        Jernej Skrabec <jernej.skrabec@...l.net>,
        devicetree <devicetree@...r.kernel.org>,
        linux-kernel <linux-kernel@...r.kernel.org>,
        linux-arm-kernel <linux-arm-kernel@...ts.infradead.org>,
        linux-sunxi <linux-sunxi@...glegroups.com>
Subject: Re: [PATCH 1/4] dt-bindings: sound: sun4i-spdif: Add Allwinner H6 compatible

Hi,

On Mon, 15 Apr 2019 at 16:51, Maxime Ripard <maxime.ripard@...tlin.com> wrote:
>
> On Mon, Apr 15, 2019 at 10:30:38AM +0200, Clément Péron wrote:
> > On Mon, 15 Apr 2019 at 10:18, Maxime Ripard <maxime.ripard@...tlin.com> wrote:
> > >
> > > On Mon, Apr 15, 2019 at 10:09:11AM +0200, Clément Péron wrote:
> > > > Hi,
> > > >
> > > > On Mon, 15 Apr 2019 at 10:04, Maxime Ripard <maxime.ripard@...tlin.com> wrote:
> > > > >
> > > > > Hi,
> > > > >
> > > > > On Thu, Apr 11, 2019 at 11:44:19PM +0200, Clément Péron wrote:
> > > > > > Allwinner H6 has a SPDIF controller with an increase of the fifo
> > > > > > size and the possibility to output the master clock.
> > > > > > However it's still compatible with the already existing driver for
> > > > > > Allwiner H3.
> > > > > >
> > > > > > Add this compatible in the device-tree bindings documentation.
> > > > >
> > > > > How was this tested?
> > > >
> > > > Using Alsa utils on a Beelink GS1 and I check correct output sound on
> > > > my home cinema.
> > > >
> > > > > After looking at the datasheet, it looks like it's still significantly
> > > > > different. In particular:
> > > > >
> > > > >   - The MCLK divider isn't at the same offset
> > > >
> > > > We don't use the MCLK
> > > >
> > > > >   - The bits to flush the FIFO aren't at the same offset
> > > > >   - The FIFO trigger levels aren't at the same offset
> > > > >   - The FIFO status register layout is almost entirely different
> > > >
> > > > We use DMA not FIFO
> > >
> > > Well, DMA still uses the FIFOs. And even then, you're kind of missing
> > > the point. The device tree's compatible is about whether a particular
> > > device can be used as another one. How you are using it in the driver
> > > is completely irrelevant.
> >
> > Sorry I meant " We use DMA not PIO".
>
> I'm still not quite sure what you mean. Both DMA and PIO would be
> using the FIFOs.

Just correcting myself but yes we use FIFO with the DMA.

>
> > I didn't change the driver and the SPDIF is working what's irrelevant
> > in declaring the driver as compatible ?
>
> It's working by accident.
>
> This won't work for example:
> https://elixir.bootlin.com/linux/latest/source/sound/soc/sunxi/sun4i-spdif.c#L181
>
> > If some feature are missing they can be introduce later as there is a
> > special binding for H6 no ?
>
> Again, that's irrelevant. The only question you need to ask yourself
> is whether, if you take an imaginary source code that would support
> all the H3 SPDIF features and run it on an H6, it works just as well.
>
> The examples above that it's not the case, so you can't claim that the
> device is compatible.

Is it ok if I fix the TX Fifo flush bit and remove the compatible with H3 ?
(Looking at the driver this is the only bit used that is incompatible with H6)

Or should I send a new driver with the correct mapping ?

Thanks
Clément


>
> Maxime
>
> --
> Maxime Ripard, Bootlin
> Embedded Linux and Kernel engineering
> https://bootlin.com

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ