alsa-devel.alsa-project.org archive mirror
 help / color / mirror / Atom feed
From: Maxime Ripard <maxime.ripard-wi1+55ScJUtKEb57/3fJTNBPR1lH4CV8@public.gmane.org>
To: Mark Brown <broonie-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org>
Cc: Liam Girdwood <lgirdwood-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>,
	Emilio Lopez <emilio-0Z03zUJReD5OxF6Tv1QG9Q@public.gmane.org>,
	linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
	linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r@public.gmane.org,
	linux-sunxi-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org,
	alsa-devel-K7yf7f+aM1XWsZ/bQMPhNw@public.gmane.org
Subject: Re: [PATCH 2/2] ASoC: sunxi: add support for the on-chip codec on early Allwinner SoCs
Date: Thu, 17 Sep 2015 15:31:35 +0200	[thread overview]
Message-ID: <20150917133135.GE4684@lukather> (raw)
In-Reply-To: <20150916191612.GM12027-GFdadSzt00ze9xe1eoZjHA@public.gmane.org>

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

Hi Mark,

On Wed, Sep 16, 2015 at 08:16:12PM +0100, Mark Brown wrote:
> On Sat, Sep 12, 2015 at 03:26:24PM +0200, Maxime Ripard wrote:
> 
> This looks pretty good, there's a few minor things below but I'll apply
> anyway - please send followup patches fixing these.

Sure, I will. Thanks!

> 
> > +	if (clk_set_rate(scodec->clk_module, clk_freq))
> > +		return -EINVAL;
> 
> Better to pass back the error code here rather than silently discard it
> (it might have more information).

Yep.

> 
> > +static struct snd_soc_dai_driver sun4i_codec_dai = {
> > +	.name	= "Codec",
> > +	.ops	= &sun4i_codec_dai_ops,
> > +	.playback = {
> > +		.stream_name	= "Codec Playback",
> > +		.channels_min	= 1,
> > +		.channels_max	= 2,
> > +		.rate_min	= 8000,
> > +		.rate_max	= 192000,
> > +		.rates		= SNDRV_PCM_RATE_8000_48000 |
> > +				  SNDRV_PCM_RATE_96000 |
> > +				  SNDRV_PCM_RATE_192000 |
> > +				  SNDRV_PCM_RATE_KNOT,
> 
> No need to specify both explicit rates and _KNOT, _KNOT covers
> everything.

Ack.

> > +		.formats	= SNDRV_PCM_FMTBIT_S16_LE |
> > +				  SNDRV_PCM_FMTBIT_S32_LE,
> > +		.sig_bits	= 24,
> 
> So presumably also S24_LE (ie, 24 bits packed into a 32 bit word)?

Hmm, probably yes, I'll test that.

> > +	/* Enable the bus clock */
> > +	if (clk_prepare_enable(scodec->clk_apb)) {
> > +		dev_err(&pdev->dev, "Failed to enable the APB clock\n");
> > +		return -EINVAL;
> > +	}
> 
> Ideally we'd have runtime power management to disable the clocks when
> idle.

We don't really have any kind of power management support currently,
but adding runtime pm everywhere is definitely on the todo list. It
might not happen before a while though.

Thanks!
Maxime

-- 
Maxime Ripard, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com

  parent reply	other threads:[~2015-09-17 13:31 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-09-12 13:26 [PATCH 0/2] ASoC: Add support for the Allwinner A10 codec Maxime Ripard
     [not found] ` <1442064384-23379-1-git-send-email-maxime.ripard-wi1+55ScJUtKEb57/3fJTNBPR1lH4CV8@public.gmane.org>
2015-09-12 13:26   ` [PATCH 1/2] Documentation: bindings: Add the Allwinner A10 codec bindings Maxime Ripard
     [not found]     ` <1442064384-23379-2-git-send-email-maxime.ripard-wi1+55ScJUtKEb57/3fJTNBPR1lH4CV8@public.gmane.org>
2015-09-16 17:33       ` Mark Brown
2015-09-16 20:01     ` Applied "ASoC: sunxi: Add the Allwinner A10 codec bindings" to the asoc tree Mark Brown
2015-09-12 13:26   ` [PATCH 2/2] ASoC: sunxi: add support for the on-chip codec on early Allwinner SoCs Maxime Ripard
     [not found]     ` <1442064384-23379-3-git-send-email-maxime.ripard-wi1+55ScJUtKEb57/3fJTNBPR1lH4CV8@public.gmane.org>
2015-09-16 19:16       ` Mark Brown
     [not found]         ` <20150916191612.GM12027-GFdadSzt00ze9xe1eoZjHA@public.gmane.org>
2015-09-17 13:31           ` Maxime Ripard [this message]
2015-09-17 15:10             ` Chen-Yu Tsai
     [not found]               ` <CAGb2v67D30+_itOAyWqGzychxeM_d7rF6TTu1_WBYuFPfFEk1g-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2015-09-17 17:37                 ` Mark Brown
2015-09-22 13:26   ` [PATCH 0/2] ASoC: Add support for the Allwinner A10 codec Priit Laes
     [not found]     ` <1442928417.6509.12.camel-q/aMd4JkU83YtjvyW6yDsg@public.gmane.org>
2015-09-28  7:42       ` Maxime Ripard
2015-09-29  8:37         ` Chen-Yu Tsai
2015-09-29 21:13         ` Hans de Goede
     [not found]           ` <560AFF14.80400-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
2015-09-30 17:33             ` 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=20150917133135.GE4684@lukather \
    --to=maxime.ripard-wi1+55scjutkeb57/3fjtnbpr1lh4cv8@public.gmane.org \
    --cc=alsa-devel-K7yf7f+aM1XWsZ/bQMPhNw@public.gmane.org \
    --cc=broonie-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org \
    --cc=emilio-0Z03zUJReD5OxF6Tv1QG9Q@public.gmane.org \
    --cc=lgirdwood-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org \
    --cc=linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r@public.gmane.org \
    --cc=linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
    --cc=linux-sunxi-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org \
    /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).