All of lore.kernel.org
 help / color / mirror / Atom feed
From: Lars-Peter Clausen <lars@metafoo.de>
To: Stefan Kristiansson <stefan.kristiansson@saunalahti.fi>,
	linux-kernel@vger.kernel.org
Cc: alsa-devel@alsa-project.org, lgirdwood@gmail.com, broonie@kernel.org
Subject: Re: [PATCH v2 3/3] ASoC: ssm2602: add support for 11.025kHz and 22.5kHz sample rates
Date: Mon, 29 Sep 2014 21:44:48 +0200	[thread overview]
Message-ID: <5429B6B0.3050709@metafoo.de> (raw)
In-Reply-To: <1412019697-19475-1-git-send-email-stefan.kristiansson@saunalahti.fi>

On 09/29/2014 09:41 PM, Stefan Kristiansson wrote:
> This adds the necessary values to the constraint list and
> register values to the coefficient table in order to
> configure the device for 11.025kHz and 22.5kHz sample rates.
>
> Signed-off-by: Stefan Kristiansson <stefan.kristiansson@saunalahti.fi>

Acked-by: Lars-Peter Clausen <lars@metafoo.de>

> ---
> Changes in v2:
>   - Keep SSM2602_RATES sorted.
> ---
>   sound/soc/codecs/ssm2602.c | 15 +++++++++++++--
>   1 file changed, 13 insertions(+), 2 deletions(-)
>
> diff --git a/sound/soc/codecs/ssm2602.c b/sound/soc/codecs/ssm2602.c
> index 4021cd4..7c41848 100644
> --- a/sound/soc/codecs/ssm2602.c
> +++ b/sound/soc/codecs/ssm2602.c
> @@ -192,7 +192,7 @@ static const struct snd_pcm_hw_constraint_list ssm2602_constraints_12288000 = {
>   };
>
>   static const unsigned int ssm2602_rates_11289600[] = {
> -	8000, 44100, 88200,
> +	8000, 11025, 22050, 44100, 88200,
>   };
>
>   static const struct snd_pcm_hw_constraint_list ssm2602_constraints_11289600 = {
> @@ -237,6 +237,16 @@ static const struct ssm2602_coeff ssm2602_coeff_table[] = {
>   	{18432000, 96000, SSM2602_COEFF_SRATE(0x7, 0x1, 0x0)},
>   	{12000000, 96000, SSM2602_COEFF_SRATE(0x7, 0x0, 0x1)},
>
> +	/* 11.025k */
> +	{11289600, 11025, SSM2602_COEFF_SRATE(0xc, 0x0, 0x0)},
> +	{16934400, 11025, SSM2602_COEFF_SRATE(0xc, 0x1, 0x0)},
> +	{12000000, 11025, SSM2602_COEFF_SRATE(0xc, 0x1, 0x1)},
> +
> +	/* 22.05k */
> +	{11289600, 22050, SSM2602_COEFF_SRATE(0xd, 0x0, 0x0)},
> +	{16934400, 22050, SSM2602_COEFF_SRATE(0xd, 0x1, 0x0)},
> +	{12000000, 22050, SSM2602_COEFF_SRATE(0xd, 0x1, 0x1)},
> +
>   	/* 44.1k */
>   	{11289600, 44100, SSM2602_COEFF_SRATE(0x8, 0x0, 0x0)},
>   	{16934400, 44100, SSM2602_COEFF_SRATE(0x8, 0x1, 0x0)},
> @@ -467,7 +477,8 @@ static int ssm2602_set_bias_level(struct snd_soc_codec *codec,
>   	return 0;
>   }
>
> -#define SSM2602_RATES (SNDRV_PCM_RATE_8000 | SNDRV_PCM_RATE_16000 |\
> +#define SSM2602_RATES (SNDRV_PCM_RATE_8000 | SNDRV_PCM_RATE_11025 |\
> +		SNDRV_PCM_RATE_16000 | SNDRV_PCM_RATE_22050 |\
>   		SNDRV_PCM_RATE_32000 | SNDRV_PCM_RATE_44100 |\
>   		SNDRV_PCM_RATE_48000 | SNDRV_PCM_RATE_88200 |\
>   		SNDRV_PCM_RATE_96000)
>

      reply	other threads:[~2014-09-29 19:44 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-09-29 19:41 [PATCH v2 3/3] ASoC: ssm2602: add support for 11.025kHz and 22.5kHz sample rates Stefan Kristiansson
2014-09-29 19:44 ` Lars-Peter Clausen [this message]

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=5429B6B0.3050709@metafoo.de \
    --to=lars@metafoo.de \
    --cc=alsa-devel@alsa-project.org \
    --cc=broonie@kernel.org \
    --cc=lgirdwood@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=stefan.kristiansson@saunalahti.fi \
    /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.