All of lore.kernel.org
 help / color / mirror / Atom feed
From: Mark Brown <broonie@kernel.org>
To: Codrin Ciubotariu <codrin.ciubotariu@microchip.com>
Cc: alsa-devel@alsa-project.org, devicetree@vger.kernel.org,
	robh+dt@kernel.org, alexandre.belloni@bootlin.com,
	nicolas.ferre@microchip.com, linux-kernel@vger.kernel.org,
	linux-arm-kernel@lists.infradead.org, florian.meier@koalo.de,
	cristian.birsan@microchip.com
Subject: Re: [PATCH 1/2] ASoC: Add driver for PROTO Audio CODEC (with a WM8731)
Date: Wed, 29 Aug 2018 15:53:55 +0100	[thread overview]
Message-ID: <20180829145355.GD27808@sirena.org.uk> (raw)
In-Reply-To: <20180829144727.13757-2-codrin.ciubotariu@microchip.com>

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

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).

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?

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 488 bytes --]

WARNING: multiple messages have this Message-ID (diff)
From: Mark Brown <broonie@kernel.org>
To: Codrin Ciubotariu <codrin.ciubotariu@microchip.com>
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 15:53:55 +0100	[thread overview]
Message-ID: <20180829145355.GD27808@sirena.org.uk> (raw)
In-Reply-To: <20180829144727.13757-2-codrin.ciubotariu@microchip.com>


[-- Attachment #1.1: Type: text/plain, Size: 970 bytes --]

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).

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?

[-- Attachment #1.2: signature.asc --]
[-- Type: application/pgp-signature, Size: 488 bytes --]

[-- Attachment #2: Type: text/plain, Size: 0 bytes --]



WARNING: multiple messages have this Message-ID (diff)
From: broonie@kernel.org (Mark Brown)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH 1/2] ASoC: Add driver for PROTO Audio CODEC (with a WM8731)
Date: Wed, 29 Aug 2018 15:53:55 +0100	[thread overview]
Message-ID: <20180829145355.GD27808@sirena.org.uk> (raw)
In-Reply-To: <20180829144727.13757-2-codrin.ciubotariu@microchip.com>

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).

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?
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 488 bytes
Desc: not available
URL: <http://lists.infradead.org/pipermail/linux-arm-kernel/attachments/20180829/7bf525a1/attachment.sig>

  reply	other threads:[~2018-08-29 14:54 UTC|newest]

Thread overview: 28+ 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 ` Codrin Ciubotariu
2018-08-29 14:47 ` 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:47   ` Codrin Ciubotariu
2018-08-29 14:47   ` Codrin Ciubotariu
2018-08-29 14:53   ` Mark Brown [this message]
2018-08-29 14:53     ` Mark Brown
2018-08-29 14:53     ` Mark Brown
2018-08-29 15:20     ` Codrin Ciubotariu
2018-08-29 15:20       ` Codrin Ciubotariu
2018-08-29 15:20       ` Codrin Ciubotariu
2018-08-29 15:26       ` Mark Brown
2018-08-29 15:26         ` Mark Brown
2018-08-29 15:26         ` Mark Brown
2018-08-29 15:33       ` Codrin Ciubotariu
2018-08-29 15:33         ` Codrin Ciubotariu
2018-08-29 15:33         ` Codrin Ciubotariu
2018-08-29 23:43   ` kbuild test robot
2018-08-29 23:43     ` kbuild test robot
2018-08-29 23:43     ` kbuild test robot
2018-08-30 10:12   ` 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-30 10:13     ` kbuild test robot
2018-08-29 14:47 ` [PATCH 2/2] ASoC: mikroe-proto: dt-bindings: add DT bindings for PROTO board Codrin Ciubotariu
2018-08-29 14:47   ` Codrin Ciubotariu
2018-08-29 14:47   ` 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=20180829145355.GD27808@sirena.org.uk \
    --to=broonie@kernel.org \
    --cc=alexandre.belloni@bootlin.com \
    --cc=alsa-devel@alsa-project.org \
    --cc=codrin.ciubotariu@microchip.com \
    --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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.