All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jarkko Nikula <jarkko.nikula@bitmer.com>
To: Joseph Telaak <joseph@telaak.dev>, Sen Wang <sen@ti.com>,
	Liam Girdwood <lgirdwood@gmail.com>,
	Mark Brown <broonie@kernel.org>, Jaroslav Kysela <perex@perex.cz>,
	Takashi Iwai <tiwai@suse.com>
Cc: linux-sound@vger.kernel.org, linux-omap@vger.kernel.org,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH 2/2] ASoC: ti: omap-mcbsp: Implement set_tdm_slot
Date: Tue, 17 Nov 2026 21:14:54 +0200	[thread overview]
Message-ID: <65ea5216-9c1c-409a-9a67-7053bbf07cd3@bitmer.com> (raw)
In-Reply-To: <20261116-omap-mcbsp-tdm-slot-v1-2-6c9f7aa45a29@telaak.dev>

Hi

On 11/17/26 12:03 AM, Joseph Telaak wrote:
> As bit clock and frame provider, McBSP sizes the frame from the SRG
> input, the set_clkdiv() divider and the rate. Only a machine driver can
> call set_clkdiv(), so with simple-audio-card or audio-graph-card the
> divider stays 1 and the bit clock runs at the full SRG input: 96 MHz on
> OMAP3, a 2000-bit frame at 48 kHz.
>
> Implement set_tdm_slot() so these cards can ask for a frame of slots x
> slot_width bit clocks with dai-tdm-slot-num and dai-tdm-slot-width.
> hw_params() then picks the divider for the rate, and startup() offers
> only the rates the SRG input divides to within 0.1%, the IEC 60958 level
> II clock tolerance. McBSP sends a frame's words back to back, so
> startup() also limits the sample width to the slot width and the
> channels to the active slots, which must be the low ones, and refuses
> I2S or left-justified with other than two slots. This applies only when
> McBSP provides both clocks; without slots nothing changes.
>
> Tested on an OMAP3630 board whose McBSP4 drives the I2S input of an
> ADV7513 with no MCLK, with 2 x 32-bit slots and adv7511 taking S32_LE:
> a left-only and a right-only 44.1 kHz tone each play at full level
> (96 MHz / 34 gives 44117.6 Hz), 48 kHz (0.8% off) and S16_LE are
> refused.
>
> Signed-off-by: Joseph Telaak <joseph@telaak.dev>
> ---
>   sound/soc/ti/omap-mcbsp-priv.h |   4 ++
>   sound/soc/ti/omap-mcbsp.c      | 155 ++++++++++++++++++++++++++++++++++++++++-
>   2 files changed, 158 insertions(+), 1 deletion(-)
Acked-by: Jarkko Nikula <jarkko.nikula@bitmer.com>

  reply	other threads:[~2026-11-17 19:14 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-11-16 22:03 [PATCH 0/2] ASoC: ti: omap-mcbsp: TDM slots for generic cards Joseph Telaak
2026-11-16 22:03 ` [PATCH 1/2] ASoC: ti: omap-mcbsp: Use all 8 bits of CLKGDV Joseph Telaak
2026-11-16 22:07   ` sashiko-bot
2026-11-17  0:26     ` Joseph Telaak
2026-11-17 19:12   ` Jarkko Nikula
2026-11-16 22:03 ` [PATCH 2/2] ASoC: ti: omap-mcbsp: Implement set_tdm_slot Joseph Telaak
2026-11-17 19:14   ` Jarkko Nikula [this message]
2026-11-17 22:11   ` Mark Brown
2026-11-18  5:09     ` Joseph Telaak

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=65ea5216-9c1c-409a-9a67-7053bbf07cd3@bitmer.com \
    --to=jarkko.nikula@bitmer.com \
    --cc=broonie@kernel.org \
    --cc=joseph@telaak.dev \
    --cc=lgirdwood@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-omap@vger.kernel.org \
    --cc=linux-sound@vger.kernel.org \
    --cc=perex@perex.cz \
    --cc=sen@ti.com \
    --cc=tiwai@suse.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 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.