alsa-devel.alsa-project.org archive mirror
 help / color / mirror / Atom feed
From: "Alexander Shiyan" <shc_work@mail.ru>
To: "Mark Brown" <broonie@kernel.org>
Cc: alsa-devel@alsa-project.org, "Arnd Bergmann" <arnd@arndb.de>,
	"Takashi Iwai" <tiwai@suse.de>,
	"Liam Girdwood" <lgirdwood@gmail.com>,
	"Olof Johansson" <olof@lixom.net>
Subject: Re: [PATCH 1/2] ASoC: Add driver for CLPS711X DAI interface
Date: Thu, 27 Feb 2014 11:17:27 +0400	[thread overview]
Message-ID: <1393485447.431844445@f286.i.mail.ru> (raw)
In-Reply-To: <20140227034430.GB9383@sirena.org.uk>

Четверг, 27 февраля 2014, 12:44 +09:00 от Mark Brown <broonie@kernel.org>:
> On Wed, Feb 26, 2014 at 08:05:41PM +0400, Alexander Shiyan wrote:
> 
> > +static int clps711x_dai_set_clkdiv(struct snd_soc_dai *dai, int div_id, int div)
> > +{
> > +	struct clps711x_dai *s = dev_get_drvdata(dai->dev);
> > +
> > +	s->div2 = div;
> > +
> > +	return 0;
> > +}
> 
> What is this divider and why does the machine driver need to manually
> configure it?

I'll think about it ...

> > +static int clps711x_pcm_trigger(struct snd_pcm_substream *substream, int cmd)
> > +{
> > +	struct snd_soc_pcm_runtime *rtd = substream->private_data;
> > +	struct clps711x_dai *dai = snd_soc_platform_get_drvdata(rtd->platform);
> > +
> > +	switch (cmd) {
> > +	case SNDRV_PCM_TRIGGER_START:
> > +		atomic_set(&dai->running, 1);
> > +		hrtimer_start(&dai->hrt, ns_to_ktime(dai->reload),
> > +			      HRTIMER_MODE_REL);
> > +		break;
> 
> I'm wondering if the FIQ code can be shared with the i.MX FIQ code?  Not
> something that should block merging but it seems like it might be
> helpful for other platforms that need to use FIQ support.

This FIQ implementation and i.MX FIQ is totally different.
I am fully confident that we can not use any common features/calls.

> > +static int clps711x_pcm_silence(struct snd_pcm_substream *substream,
> > +				int channel, snd_pcm_uframes_t pos,
> > +				snd_pcm_uframes_t count)
> > +{
> > +	return 0;
> > +}
> 
> Omit empty functions.

So designed. I'll add a comment in the next version.

> > +#if defined(CONFIG_SND_CLPS711X_SOC_MODULE)
> > +irqreturn_t no_action(int irq, void *dev_id)
> > +{
> > +	return IRQ_NONE;
> > +}
> > +#endif
> 
> Eh?  Waht's this about?

In case using this driver as non-module, "no_action" handler is used
from kernel/irq/handle.c, but since it is not exported it cannot be used
in module case.
I'll remade this to use own empty handler always.

---
_______________________________________________
Alsa-devel mailing list
Alsa-devel@alsa-project.org
http://mailman.alsa-project.org/mailman/listinfo/alsa-devel

  reply	other threads:[~2014-02-27  7:17 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-02-26 16:05 [PATCH 0/2] ASoC: ARM Cirrus Logic CLPS711X DAI driver Alexander Shiyan
2014-02-26 16:05 ` [PATCH 1/2] ASoC: Add driver for CLPS711X DAI interface Alexander Shiyan
2014-02-27  3:44   ` Mark Brown
2014-02-27  7:17     ` Alexander Shiyan [this message]
2014-02-28  3:57       ` Mark Brown

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=1393485447.431844445@f286.i.mail.ru \
    --to=shc_work@mail.ru \
    --cc=alsa-devel@alsa-project.org \
    --cc=arnd@arndb.de \
    --cc=broonie@kernel.org \
    --cc=lgirdwood@gmail.com \
    --cc=olof@lixom.net \
    --cc=tiwai@suse.de \
    /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;
as well as URLs for NNTP newsgroup(s).