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: <20140930181910.GJ4273@sirena.org.uk>
Date:	Tue, 30 Sep 2014 19:19:10 +0100
From:	Mark Brown <broonie@...nel.org>
To:	Jean-Francois Moine <moinejf@...e.fr>
Cc:	Russell King - ARM Linux <linux@....linux.org.uk>,
	alsa-devel@...a-project.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH] ASoC:kirkwood: Don't raise an error when no DAI format

On Sun, Sep 28, 2014 at 06:05:50PM +0200, Jean-Francois Moine wrote:
> Russell King - ARM Linux <linux@....linux.org.uk> wrote:
> > On Sun, Sep 28, 2014 at 04:19:27PM +0200, Jean-Francois Moine wrote:

> > > This patch prevents the controller to raise an error when
> > > the DT audio card definition by the simple card contains the PCM
> > > format of one CPU DAI only.

> > I think this is a silly idea - why should every driver have additional code
> > to detect when it's called to do thing.  Why doesn't the simple card code
> > always pass the required format?

> > Looking at other drivers, no one else does this; they all appear to require
> > the proper format to be specified.

> > What some drivers do (eg, omap-mcbsp.c) is to block set_fmt when the
> > DAI is already in use - setting a flag "configured" in hw_params, and
> > clearing it in shutdown.  Maybe following this will solve your problem.

> > In any case, random drivers doing stuff differently without reason is
> > really not a good idea.

> As the simple card is done, the audio hardware definitions of the
> platform and all the CPU DAIS are always set in the audio controller.

> When the PCM format is globally defined (platform), the function
> set_fmt() is called for all CPU DAIs (then, twice for the kirkwood
> controller) with the same value. The DT is:

...

> The PCM format may also be defined per DAI link. The following DT works
> the same as setting globally the format, i.e. there are two calls to
> set_fmt() with 'i2s':

> The problem appears when the format is defined in only one DAI link:

> Then, audio does not work.

So this is still a generic rather than driver issue and should be solved
outside of the driver - exactly the same issue is going to apply to any
other device with a similar shared configuration.  We could either say
that the DT is buggy here or we could say that the generic card ought to
assume that if only one link specifies a format then it should use that
format for other links if possible (since clearly the user doesn't care
what it chooses).

Please also try to use subject lines matching the style for the
subsystem.  You've been working with upstream for a while, you really
ought to be familiar with this sort of basic process stuff.

Download attachment "signature.asc" of type "application/pgp-signature" (474 bytes)

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ