From: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
To: Zhu Ning <zhuning0077@gmail.com>, alsa-devel@alsa-project.org
Cc: broonie@kernel.org, tiwai@suse.com,
David Yang <yangxiaohua@everest-semi.com>,
vijendar.mukunda@amd.com
Subject: Re: [PATCH] ASoC: codes: Add support for ES8316 producer mode
Date: Fri, 1 Jul 2022 08:44:24 -0500 [thread overview]
Message-ID: <068e141c-c0d8-e759-8cb6-36fc27c88465@linux.intel.com> (raw)
In-Reply-To: <20220701020537.970950-1-zhuning0077@gmail.com>
> /* Validate supported sample rates that are autodetected from MCLK */
> @@ -477,19 +478,24 @@ static int es8316_pcm_hw_params(struct snd_pcm_substream *substream,
> }
> if (i == NR_SUPPORTED_MCLK_LRCK_RATIOS)
> return -EINVAL;
> -
> + lrck_divider = es8316->sysclk/params_rate(params);
> + bclk_divider = lrck_divider/4;
> switch (params_format(params)) {
> case SNDRV_PCM_FORMAT_S16_LE:
> wordlen = ES8316_SERDATA2_LEN_16;
> + bclk_divider/=16;
> break;
> case SNDRV_PCM_FORMAT_S20_3LE:
> wordlen = ES8316_SERDATA2_LEN_20;
> + bclk_divider/=32;
S20_3LE uses 3 bytes, is the 32 divider correct here?
> break;
> case SNDRV_PCM_FORMAT_S24_LE:
> wordlen = ES8316_SERDATA2_LEN_24;
> + bclk_divider/=24;> break;
> case SNDRV_PCM_FORMAT_S32_LE:
> wordlen = ES8316_SERDATA2_LEN_32;
> + bclk_divider/=32;
> break;
> default:
> return -EINVAL;
next prev parent reply other threads:[~2022-07-01 14:53 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-07-01 2:05 [PATCH] ASoC: codes: Add support for ES8316 producer mode Zhu Ning
2022-07-01 9:43 ` Mark Brown
2022-07-01 13:44 ` Pierre-Louis Bossart [this message]
-- strict thread matches above, loose matches on Subject: below --
2022-07-04 1:24 Zhu Ning
2022-07-04 15:57 ` 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=068e141c-c0d8-e759-8cb6-36fc27c88465@linux.intel.com \
--to=pierre-louis.bossart@linux.intel.com \
--cc=alsa-devel@alsa-project.org \
--cc=broonie@kernel.org \
--cc=tiwai@suse.com \
--cc=vijendar.mukunda@amd.com \
--cc=yangxiaohua@everest-semi.com \
--cc=zhuning0077@gmail.com \
/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