From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751573AbbIQNbj (ORCPT ); Thu, 17 Sep 2015 09:31:39 -0400 Received: from down.free-electrons.com ([37.187.137.238]:33095 "EHLO mail.free-electrons.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1750792AbbIQNbi (ORCPT ); Thu, 17 Sep 2015 09:31:38 -0400 Date: Thu, 17 Sep 2015 15:31:35 +0200 From: Maxime Ripard To: Mark Brown Cc: Liam Girdwood , Emilio Lopez , linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-sunxi@googlegroups.com, alsa-devel@alsa-project.org Subject: Re: [PATCH 2/2] ASoC: sunxi: add support for the on-chip codec on early Allwinner SoCs Message-ID: <20150917133135.GE4684@lukather> References: <1442064384-23379-1-git-send-email-maxime.ripard@free-electrons.com> <1442064384-23379-3-git-send-email-maxime.ripard@free-electrons.com> <20150916191612.GM12027@sirena.org.uk> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="SKW69dzTt3T8RCN0" Content-Disposition: inline In-Reply-To: <20150916191612.GM12027@sirena.org.uk> User-Agent: Mutt/1.5.23 (2014-03-12) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org --SKW69dzTt3T8RCN0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable 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: >=20 > 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! >=20 > > + if (clk_set_rate(scodec->clk_module, clk_freq)) > > + return -EINVAL; >=20 > Better to pass back the error code here rather than silently discard it > (it might have more information). Yep. >=20 > > +static struct snd_soc_dai_driver sun4i_codec_dai =3D { > > + .name =3D "Codec", > > + .ops =3D &sun4i_codec_dai_ops, > > + .playback =3D { > > + .stream_name =3D "Codec Playback", > > + .channels_min =3D 1, > > + .channels_max =3D 2, > > + .rate_min =3D 8000, > > + .rate_max =3D 192000, > > + .rates =3D SNDRV_PCM_RATE_8000_48000 | > > + SNDRV_PCM_RATE_96000 | > > + SNDRV_PCM_RATE_192000 | > > + SNDRV_PCM_RATE_KNOT, >=20 > No need to specify both explicit rates and _KNOT, _KNOT covers > everything. Ack. > > + .formats =3D SNDRV_PCM_FMTBIT_S16_LE | > > + SNDRV_PCM_FMTBIT_S32_LE, > > + .sig_bits =3D 24, >=20 > 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; > > + } >=20 > 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 --=20 Maxime Ripard, Free Electrons Embedded Linux, Kernel and Android engineering http://free-electrons.com --SKW69dzTt3T8RCN0 Content-Type: application/pgp-signature; name="signature.asc" Content-Description: Digital signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v1 iQIcBAEBAgAGBQJV+sC3AAoJEBx+YmzsjxAg5ukP/jyzGEgpKd22GR8noKY6e9n8 psSw65s07ndtYNlOanNys98jhRxFyRJ4rZAJPdcBnwwj0TuVRLZ1sM1KHjPwj4qh XxjkDWVqgBda934MDK9C2TmSY69AwwAVI6LRwgnlwVWMS0WfIthUj0CofnWwMY9p uvzBTXdVQ514VVbW+s4yqqdrfPGk0ITZeJiIqa3hyngnQfD4qpepzel74FuZjTkx YIfYAXsD+QzInAEK0O1urOQtI0H8OkWYlp26gSQ7CrlQ5IyD5ed4O3GLuweLu7SN H77cdc8jdKOe81c/pD8VNSCjVeFjL2ixuqPqphpKPZ9KH+Wb54RN7PGiriYGcP1U yrloe8HdMiwjINNiFq/27mMkVU9N7VuG8Y8NXnx1DpxmnnN+J2UK3reSJlL8uGBy QyFI1LkAjaEEXT+/7+EzFX2TIrAvfPGB2HVxZ2HUOTJlzqVvRjiUezdq3uQGu/GV gtnjf2mQ3H3WRbJt59ULeKpGIDs57VGCjLJJHrgZw8PkvabNNXijfcZ8pS3FGirv mu08kT/kEe0N1dBF5eHBefubxaniRxEWr9vKZJncwYHezpFWJSx93e2r3ZgG6GQ5 0F4ZDE62HFhGK9zV4Vt7x1d+OgOqJ/yZ6/SvNNmg/UmepfN42rWrnwyXEyQMtngW d7yltmA3iiPczuV1Dpj8 =5oNv -----END PGP SIGNATURE----- --SKW69dzTt3T8RCN0--