All of lore.kernel.org
 help / color / mirror / Atom feed
From: Mark Brown <broonie@kernel.org>
To: Jyri Sarha <jsarha@ti.com>
Cc: Sven Van Asbroeck <thesven73@gmail.com>,
	alsa-devel@alsa-project.org, Liam Girdwood <lgirdwood@gmail.com>,
	Takashi Iwai <tiwai@suse.com>,
	Peter Ujfalusi <peter.ujfalusi@ti.com>,
	Russell King <rmk+kernel@armlinux.org.uk>
Subject: Re: [PATCH RFC 2/3] ASoC: hdmi-codec: add support for bclk_ratio
Date: Fri, 1 Mar 2019 12:36:29 +0000	[thread overview]
Message-ID: <20190301123629.GC7429@sirena.org.uk> (raw)
In-Reply-To: <520b346f-a874-790d-61ec-fb4ac67ad046@ti.com>


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

On Mon, Feb 25, 2019 at 03:45:44PM +0200, Jyri Sarha wrote:
> On 22/02/2019 23:27, Russell King wrote:

> > +	/*
> > +	 * If the .set_bclk_ratio() has not been called, default it
> > +	 * using the sample width for compatibility for TDA998x.
> > +	 * Rather than changing this, drivers should arrange to make
> > +	 * an appropriate call to snd_soc_dai_set_bclk_ratio().
> > +	 */
> > +	if (fmt.bclk_ratio == 0) {
> > +		switch (hp.sample_width) {
> > +		case 16:
> > +			fmt.bclk_ratio = 32;
> > +			break;
> > +		case 18:
> > +		case 20:
> > +		case 24:
> > +			fmt.bclk_ratio = 48;
> > +			break;

> AFAIK, this is not the usual choice for 18- or 20-bit samples. Usually,
> the bclk_ratio is set to the exact frame length required by the sample
> width without any padding. That is at least the case with
> tlv320aic3x-driver and 20-bit sample width.

So, this is true.  On the other hand like Russell says further down the
thread it's preserving the existing behaviour so it would be surprising
if it actually broke anything and it will help systems that explicitly
set the ratio so I don't think we should let perfect be the enemy of
good here.

As Russell outlined there's quite a bit of hopeful assumption in how
ASoC handles the mapping of memory formats onto wire formats which works
almost all the time but not always and definitely not through robust
design, that should be a lot easier to address once the component
conversion has been done as we'll actually have all the links in the
system directly visible rather than bundled up together and implied as
they are currently.  Sadly that's a lot of work with not many people
working on it so progress is super slow.

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

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



  parent reply	other threads:[~2019-03-01 12:36 UTC|newest]

Thread overview: 28+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-02-22 21:26 [PATCH RFC 0/3] tda998x updates for DAI formats and bclk_ratio Russell King - ARM Linux admin
2019-02-22 21:27 ` [PATCH RFC 1/3] drm/i2c: tda998x: implement different I2S flavours Russell King
2019-02-25 13:26   ` Jyri Sarha
2019-02-25 13:28   ` Peter Ujfalusi
2019-02-25 13:40     ` Russell King - ARM Linux admin
2019-02-25 16:23   ` Sven Van Asbroeck
2019-02-22 21:27 ` [PATCH RFC 2/3] ASoC: hdmi-codec: add support for bclk_ratio Russell King
2019-02-25 13:45   ` Jyri Sarha
2019-02-25 14:03     ` Russell King - ARM Linux admin
2019-02-25 20:58       ` Jyri Sarha
2019-02-25 23:01         ` Russell King - ARM Linux admin
2019-02-27 11:47         ` Russell King - ARM Linux admin
2019-02-27 17:48           ` Jyri Sarha
2019-02-27 18:00             ` Russell King - ARM Linux admin
2019-02-27 20:24               ` Jyri Sarha
2019-02-27 18:01       ` Sven Van Asbroeck
2019-02-27 19:56         ` Russell King - ARM Linux admin
2019-02-27 20:22           ` Sven Van Asbroeck
2019-02-27 20:24           ` Russell King - ARM Linux admin
2019-03-01 12:36     ` Mark Brown [this message]
2019-03-01 14:05       ` Jyri Sarha
2019-03-01 14:59         ` Russell King - ARM Linux admin
2019-03-01 16:35           ` Jyri Sarha
2019-03-04 16:59       ` Sven Van Asbroeck
2019-03-04 17:32         ` Jyri Sarha
2019-02-22 21:27 ` [PATCH RFC 3/3] drm/i2c: tda998x: " Russell King
2019-02-25 13:47   ` Jyri Sarha
2019-02-25 16:26   ` Sven Van Asbroeck

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=20190301123629.GC7429@sirena.org.uk \
    --to=broonie@kernel.org \
    --cc=alsa-devel@alsa-project.org \
    --cc=jsarha@ti.com \
    --cc=lgirdwood@gmail.com \
    --cc=peter.ujfalusi@ti.com \
    --cc=rmk+kernel@armlinux.org.uk \
    --cc=thesven73@gmail.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.