public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Mark Brown <broonie@kernel.org>
To: Jean-Francois Moine <moinejf@free.fr>
Cc: Russell King - ARM Linux <linux@arm.linux.org.uk>,
	alsa-devel@alsa-project.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] ASoC:kirkwood: Don't raise an error when no DAI format
Date: Tue, 30 Sep 2014 19:19:10 +0100	[thread overview]
Message-ID: <20140930181910.GJ4273@sirena.org.uk> (raw)
In-Reply-To: <20140928180550.5f0b8f03@armhf>

[-- Attachment #1: Type: text/plain, Size: 2262 bytes --]

On Sun, Sep 28, 2014 at 06:05:50PM +0200, Jean-Francois Moine wrote:
> Russell King - ARM Linux <linux@arm.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.

[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 473 bytes --]

  reply	other threads:[~2014-09-30 18:19 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <20140928150342.CC21B786A1D@smtpfb1-g21.free.fr>
2014-09-28 15:12 ` [PATCH] ASoC:kirkwood: Don't raise an error when no DAI format Russell King - ARM Linux
2014-09-28 16:05   ` Jean-Francois Moine
2014-09-30 18:19     ` Mark Brown [this message]
2014-10-01  8:59       ` Jean-Francois Moine

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20140930181910.GJ4273@sirena.org.uk \
    --to=broonie@kernel.org \
    --cc=alsa-devel@alsa-project.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux@arm.linux.org.uk \
    --cc=moinejf@free.fr \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox