From: Mark Brown <broonie@kernel.org>
To: Chen-Yu Tsai <wens@csie.org>
Cc: Maxime Ripard <maxime.ripard@free-electrons.com>,
Liam Girdwood <lgirdwood@gmail.com>,
Emilio Lopez <emilio@elopez.com.ar>,
linux-kernel <linux-kernel@vger.kernel.org>,
linux-arm-kernel <linux-arm-kernel@lists.infradead.org>,
linux-sunxi <linux-sunxi@googlegroups.com>,
alsa-devel@alsa-project.org
Subject: Re: [linux-sunxi] Re: [PATCH 2/2] ASoC: sunxi: add support for the on-chip codec on early Allwinner SoCs
Date: Thu, 17 Sep 2015 18:37:56 +0100 [thread overview]
Message-ID: <20150917173756.GE12027@sirena.org.uk> (raw)
In-Reply-To: <CAGb2v67D30+_itOAyWqGzychxeM_d7rF6TTu1_WBYuFPfFEk1g@mail.gmail.com>
[-- Attachment #1: Type: text/plain, Size: 1104 bytes --]
On Thu, Sep 17, 2015 at 11:10:41PM +0800, Chen-Yu Tsai wrote:
> On Thu, Sep 17, 2015 at 9:31 PM, Maxime Ripard
> >> > + .formats = SNDRV_PCM_FMTBIT_S16_LE |
> >> > + SNDRV_PCM_FMTBIT_S32_LE,
> >> > + .sig_bits = 24,
> >> So presumably also S24_LE (ie, 24 bits packed into a 32 bit word)?
> > Hmm, probably yes, I'll test that.
> IIRC when Emilio first wrote the driver, we tried 24 bit and no sound
> came out. Turns out it's an alignment issue. The codec's FIFO register
> is 32 bits wide, and takes the higher 24 bits as input when set to 24
> bit mode. The internal FIFO is only 24 bits wide. A20 user manual P174
> describes how the bits are copied.
> So for 24 bit audio, you would actually send it 32 bit audio samples,
> and let it truncate or drop the least significant 8 bits. This is why
> we have SNDRV_PCM_FMTBIT_S32_LE with .sig_bits = 24.
> I don't know if this is just a workaround, but a few other drivers do
> this as well, for example twl3040 and omap-mcpdm.
That's very common - it's essentially what S24_LE mode is.
[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 473 bytes --]
next prev parent reply other threads:[~2015-09-17 17:38 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-09-12 13:26 [PATCH 0/2] ASoC: Add support for the Allwinner A10 codec Maxime Ripard
2015-09-12 13:26 ` [PATCH 1/2] Documentation: bindings: Add the Allwinner A10 codec bindings Maxime Ripard
2015-09-16 17:33 ` Mark Brown
2015-09-12 13:26 ` [PATCH 2/2] ASoC: sunxi: add support for the on-chip codec on early Allwinner SoCs Maxime Ripard
2015-09-16 19:16 ` Mark Brown
2015-09-17 13:31 ` Maxime Ripard
2015-09-17 15:10 ` [linux-sunxi] " Chen-Yu Tsai
2015-09-17 17:37 ` Mark Brown [this message]
2015-09-22 13:26 ` [linux-sunxi] [PATCH 0/2] ASoC: Add support for the Allwinner A10 codec Priit Laes
2015-09-28 7:42 ` Maxime Ripard
2015-09-29 8:37 ` Chen-Yu Tsai
2015-09-29 21:13 ` Hans de Goede
2015-09-30 17:33 ` 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=20150917173756.GE12027@sirena.org.uk \
--to=broonie@kernel.org \
--cc=alsa-devel@alsa-project.org \
--cc=emilio@elopez.com.ar \
--cc=lgirdwood@gmail.com \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-sunxi@googlegroups.com \
--cc=maxime.ripard@free-electrons.com \
--cc=wens@csie.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
all inboxes | Powered by JetHome®