From: Codrin Ciubotariu <codrin.ciubotariu@microchip.com>
To: Mark Brown <broonie@kernel.org>
Cc: devicetree@vger.kernel.org, alsa-devel@alsa-project.org,
nicolas.ferre@microchip.com, alexandre.belloni@bootlin.com,
linux-kernel@vger.kernel.org, robh+dt@kernel.org,
florian.meier@koalo.de, cristian.birsan@microchip.com,
linux-arm-kernel@lists.infradead.org
Subject: Re: [PATCH 1/2] ASoC: Add driver for PROTO Audio CODEC (with a WM8731)
Date: Wed, 29 Aug 2018 18:20:59 +0300 [thread overview]
Message-ID: <8f1ecff2-aab7-2a1d-a8d3-8d0062a8a9e0@microchip.com> (raw)
In-Reply-To: <20180829145355.GD27808@sirena.org.uk>
On 29.08.2018 17:53, Mark Brown wrote:
> On Wed, Aug 29, 2018 at 05:47:26PM +0300, Codrin Ciubotariu wrote:
>
>> +static const unsigned int wm8731_rates_12288000[] = {
>> + 8000, 32000, 48000, 96000,
>> +};
>> +
>> +static struct snd_pcm_hw_constraint_list wm8731_constraints_12288000 = {
>> + .list = wm8731_rates_12288000,
>> + .count = ARRAY_SIZE(wm8731_rates_12288000),
>> +};
>> +
>> +static int snd_proto_startup(struct snd_pcm_substream *substream)
>> +{
>> + /* Setup constraints, because there is a 12.288 MHz XTAL on the board */
>> + snd_pcm_hw_constraint_list(substream->runtime, 0,
>> + SNDRV_PCM_HW_PARAM_RATE,
>> + &wm8731_constraints_12288000);
>> + return 0;
>> +}
>
> This bit is better added to the CODEC driver since it'll apply to any
> system where there's this clock rate (someone else could come in and add
> other rates, no need to do that yourself though it'd be nice of course).
I could do it.
>
> That also has the nice bonus that with that I think you'd be able to use
> the graph card rather than a custom driver?
The main reason for adding a custom driver and not using graph/simple
card is the snd_soc_dai_set_sysclk(codec_dai, WM8731_SYSCLK_XTAL,
XTAL_RATE, SND_SOC_CLOCK_IN) call. This
enables the oscillator found in the wm8731 codec. Since
WM8731_SYSCLK_XTAL is not 0, we can't use system-clock-frequency DT
property to set it.
Best regards,
Codrin
next prev parent reply other threads:[~2018-08-29 15:20 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-08-29 14:47 [PATCH 0/2] ASoC: Add support for MikroElektronika PROTO codec Codrin Ciubotariu
2018-08-29 14:47 ` [PATCH 1/2] ASoC: Add driver for PROTO Audio CODEC (with a WM8731) Codrin Ciubotariu
2018-08-29 14:53 ` Mark Brown
2018-08-29 15:20 ` Codrin Ciubotariu [this message]
2018-08-29 15:26 ` Mark Brown
2018-08-29 15:33 ` Codrin Ciubotariu
2018-08-29 23:43 ` kbuild test robot
2018-08-30 10:12 ` kbuild test robot
2018-08-30 10:13 ` [PATCH] ASoC: fix platform_no_drv_owner.cocci warnings kbuild test robot
2018-08-29 14:47 ` [PATCH 2/2] ASoC: mikroe-proto: dt-bindings: add DT bindings for PROTO board Codrin Ciubotariu
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=8f1ecff2-aab7-2a1d-a8d3-8d0062a8a9e0@microchip.com \
--to=codrin.ciubotariu@microchip.com \
--cc=alexandre.belloni@bootlin.com \
--cc=alsa-devel@alsa-project.org \
--cc=broonie@kernel.org \
--cc=cristian.birsan@microchip.com \
--cc=devicetree@vger.kernel.org \
--cc=florian.meier@koalo.de \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=nicolas.ferre@microchip.com \
--cc=robh+dt@kernel.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).