All of lore.kernel.org
 help / color / mirror / Atom feed
From: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
To: Sven Van Asbroeck <thesven73@gmail.com>,
	Jaroslav Kysela <perex@perex.cz>
Cc: alsa-devel@alsa-project.org, Mark Brown <broonie@kernel.org>,
	Russell King - ARM Linux admin <linux@armlinux.org.uk>
Subject: Re: [RFC PATCH 1/4] alsa: make hw_params negotiation infrastructure 'bclk_ratio aware'
Date: Fri, 8 Mar 2019 14:49:48 -0600	[thread overview]
Message-ID: <865cd0e3-8390-024d-6c84-c416bfe3cb45@linux.intel.com> (raw)
In-Reply-To: <CAGngYiVaFswVrVYfUpo4YfkH+nxwaW+8q8q3C6_wfggS7YCYjw@mail.gmail.com>


>> I agree. We just need a library which will:
>>
>> 1) gather the information from hardware drivers
>>    - a simple description of the bclk constrains
>> 2) create right constraints (hw_params rules) for the ALSA PCM API
>> 3) return the selected bclk when hw_params are installed
>>
> Yes, that's what the RFC patch I posted attempts to do.
> But it extends hw_params, which is clearly wrong.
>
>> The library should not extend hw_params (new interval), but it should
>> work as a separate layer - use new structures / functions etc.
>>
> This, I could not work out how to approach :)

I am not sure I fully understand the ask but wanted to point out that 
for ASoC topology-based solutions the bclk rate is typically passed as a 
parameter from userspace (w/ a request_firmware and topology parsing) 
and might be forwarded over IPC to a DSP. On some Intel platforms which 
can't support 32x fs that is typically how we represent a bclk ratio 
multiple of 25. the kernel has no idea of the relationship between the 
representation of the stream in memory and the final bit clock, only the 
DSP which programs the hardware registers knows about the latter.

It's really quite typical that the DAI is programmed for a fixed 
configuration and the DSP takes care of the conversions. The kernel only 
deals with stream triggers and power management without know all the 
internal details of the audio graph.

  reply	other threads:[~2019-03-08 20:49 UTC|newest]

Thread overview: 23+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-03-04 16:59 [RFC PATCH 1/4] alsa: make hw_params negotiation infrastructure 'bclk_ratio aware' Sven Van Asbroeck
2019-03-04 16:59 ` [RFC PATCH 2/4] ASoC: hdmi-codec: add support for bclk_ratio Sven Van Asbroeck
2019-03-04 16:59 ` [RFC PATCH 3/4] drm/i2c: tda998x: calculate CTS_N directly from the bclk_ratio Sven Van Asbroeck
2019-03-04 16:59 ` [RFC PATCH 4/4] ASoC: fsl_ssi: constrain bclk_ratio in i2s master mode Sven Van Asbroeck
2019-03-05  4:42 ` [RFC PATCH 1/4] alsa: make hw_params negotiation infrastructure 'bclk_ratio aware' Takashi Sakamoto
2019-03-05  9:35   ` Russell King - ARM Linux admin
2019-03-05 14:23   ` Sven Van Asbroeck
2019-03-06 15:53     ` Jaroslav Kysela
2019-03-08  4:10     ` Takashi Sakamoto
2019-03-08 12:59       ` Russell King - ARM Linux admin
2019-03-08 13:37         ` Russell King - ARM Linux admin
2019-03-08 14:29         ` Takashi Sakamoto
2019-03-08 14:55           ` Russell King - ARM Linux admin
2019-03-08 17:22         ` Mark Brown
2019-03-08 19:54           ` Jaroslav Kysela
2019-03-08 20:07             ` Sven Van Asbroeck
2019-03-08 20:49               ` Pierre-Louis Bossart [this message]
2019-03-08 21:13                 ` Mark Brown
2019-03-08 21:54                   ` Pierre-Louis Bossart
2019-03-11  8:15             ` Takashi Sakamoto
2019-03-11 15:43               ` Jaroslav Kysela
2019-03-12 15:03                 ` Mark Brown
2019-03-13  5:57                   ` Takashi Sakamoto

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=865cd0e3-8390-024d-6c84-c416bfe3cb45@linux.intel.com \
    --to=pierre-louis.bossart@linux.intel.com \
    --cc=alsa-devel@alsa-project.org \
    --cc=broonie@kernel.org \
    --cc=linux@armlinux.org.uk \
    --cc=perex@perex.cz \
    --cc=thesven73@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 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.