From: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
To: Mark Brown <broonie@kernel.org>
Cc: alsa-devel@alsa-project.org, Rob Herring <robh+dt@kernel.org>,
linux-gpio@vger.kernel.org, tiwai@suse.de,
Linus Walleij <linus.walleij@linaro.org>,
Stephen Boyd <sboyd@kernel.org>,
Daniel Matuschek <daniel@hifiberry.com>,
Hui Wang <hui.wang@canonical.com>,
Matthias Reichl <hias@horus.com>,
Michael Turquette <mturquette@baylibre.com>,
Bartosz Golaszewski <bgolaszewski@baylibre.com>,
Andy Shevchenko <andriy.shevchenko@linux.intel.com>,
linux-clk@vger.kernel.org
Subject: Re: [RFC PATCH 02/16] ASoC: pcm512x: use "sclk" string to retrieve clock
Date: Wed, 15 Apr 2020 09:44:12 -0500 [thread overview]
Message-ID: <4635e57b-fccd-d8a9-fa99-8124debb3428@linux.intel.com> (raw)
In-Reply-To: <20200415113630.GC5265@sirena.org.uk>
On 4/15/20 6:36 AM, Mark Brown wrote:
> On Tue, Apr 14, 2020 at 03:13:01PM -0500, Pierre-Louis Bossart wrote:
>> On 4/14/20 2:50 PM, Mark Brown wrote:
>
>>> It's not just DT platforms that I'm worried about here, it's also ACPI
>>> systems - all it takes is for a system to have a second device and a
>>> name collision could happen, especially with such generic names. We
>>> tried to avoid doing this for board files for the same reason.
>
>> I am on the paranoid side but here I don't see much potential for conflicts:
>
>> a) this only works for the Up2 board with a HAT connector
>> b) this only work with the Hifiberry DAC+ PRO board.
>
>> This codec is not used in any traditional client devices.
>
> That's what you're doing right now but someone else can use the same
> devices, or adopt the same approaches on something like a Chromebook.
>
>>> My understanding is that ACPI just doesn't have clock bindings (or audio
>>> bindings or...) so you're basically using board files here and board
>>> files can definitely do more than we're seeing here.
>
>> I don't understand your definition of board file, sorry. We've never had
>> one, the only thing that's board-specific is the machine driver.
>
> Architectures that don't have firmware bindings use straight C code to
> register and set things up. Machine drivers are essentially board
> files, they're just audio specific bits of board file that use audio
> APIs and so are in the sound directory.
Humm, we may have a conceptual disconnect here. In the ACPI world, there
is no support for the machine driver - unlike Device Tree. It is probed
when the SST/SOF driver creates a platform device using the codec _HID
as a key to hard-coded lookup tables in
sound/soc/intel/common/soc-acpi*.c - it will be probed *after* the codec
driver probes. I really don't see how to use the machine driver as
currently implemented to establish board-level connections that would
influence the codec driver probe and its use of a clock.
>
>>> You should be able to register links between devices using the clock
>>> API, or add that functionality if it's not there but AFAIK clkdev still
>>> works.
>
>> The machine driver has no information whatsoever on who provides the clock.
>> I just don't see how I might link stuff without at least some amount of
>> information?
>
> The machine driver must have this information, it knows exactly what
> hardware it runs on. The whole point of a machine driver is that it's
> board specific.
>
>> All I needed was to toggle 2 gpios to select 44.1 or 48kHz...Looks like it's
>> going to take two more years, oh well.
>
> I think you're giving up way too easily here. The kernel has really
> good support for systems that don't have any firmware description at
> all, this shouldn't be complex or breaking new ground.
See above, I don't think the machine driver can do what you had in mind?
I don't see how to proceed unless we remove all support for ACPI, both
for codec and clock driver, and trigger their probe "manually" with a
board-level initialization.
And btw there's already a precedent for using global names, it's what
the Skylake driver does for the mclk and ssp clocks. To the best of my
knowledge the device specific namespacing does not exist on any ACPI
platform. We have a request from Dialog to implement the same thing for
SOF to solve dependencies on the clock being stable before turning on
the codec, so if global names are not acceptable we have a real problem.
next prev parent reply other threads:[~2020-04-15 14:59 UTC|newest]
Thread overview: 68+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-04-09 19:58 [RFC PATCH 00/16] ASoC/SOF/clk/gpio/dt: add Hifiberry DAC+ PRO support Pierre-Louis Bossart
2020-04-09 19:58 ` [RFC PATCH 01/16] ASoC: pcm512x: expose 6 GPIOs Pierre-Louis Bossart
2020-04-14 17:09 ` Andy Shevchenko
2020-04-14 17:52 ` Pierre-Louis Bossart
2020-04-15 9:49 ` Andy Shevchenko
2020-04-16 11:42 ` Linus Walleij
2020-04-16 14:25 ` Pierre-Louis Bossart
2020-04-09 19:58 ` [RFC PATCH 02/16] ASoC: pcm512x: use "sclk" string to retrieve clock Pierre-Louis Bossart
2020-04-14 17:11 ` Andy Shevchenko
2020-04-14 17:54 ` Pierre-Louis Bossart
2020-04-15 9:52 ` Andy Shevchenko
2020-04-15 14:19 ` Pierre-Louis Bossart
2020-04-15 15:10 ` Andy Shevchenko
2020-04-14 17:45 ` Mark Brown
2020-04-14 18:14 ` Pierre-Louis Bossart
2020-04-14 18:27 ` Mark Brown
2020-04-14 19:15 ` Pierre-Louis Bossart
2020-04-14 19:50 ` Mark Brown
2020-04-14 20:13 ` Pierre-Louis Bossart
2020-04-14 21:02 ` Pierre-Louis Bossart
2020-04-15 11:07 ` Mark Brown
2020-04-15 11:36 ` Mark Brown
2020-04-15 14:44 ` Pierre-Louis Bossart [this message]
2020-04-15 16:22 ` Mark Brown
2020-04-15 17:26 ` Pierre-Louis Bossart
2020-04-15 19:50 ` Mark Brown
2020-04-15 20:22 ` Pierre-Louis Bossart
2020-04-15 20:39 ` Mark Brown
2020-04-09 19:58 ` [RFC PATCH 03/16] ASoC: Intel: sof-pcm512x: use gpiod for LED Pierre-Louis Bossart
2020-04-14 17:17 ` Andy Shevchenko
2020-04-14 17:52 ` Mark Brown
2020-04-14 17:57 ` Pierre-Louis Bossart
2020-04-15 9:51 ` Andy Shevchenko
2020-04-09 19:58 ` [RFC PATCH 04/16] ASoC: Intel: sof-pcm512x: detect Hifiberry DAC+ PRO Pierre-Louis Bossart
2020-04-14 17:20 ` Andy Shevchenko
2020-04-14 18:02 ` Pierre-Louis Bossart
2020-04-15 9:55 ` Andy Shevchenko
2020-04-15 14:07 ` Pierre-Louis Bossart
2020-04-15 15:05 ` Andy Shevchenko
2020-04-09 19:58 ` [RFC PATCH 05/16] ASoC: Intel: sof-pcm512x: reconfigure sclk in hw_params if needed Pierre-Louis Bossart
2020-04-14 17:24 ` Andy Shevchenko
2020-04-14 18:06 ` Pierre-Louis Bossart
2020-04-09 19:58 ` [RFC PATCH 06/16] ASoC: Intel: sof-pcm512x: select HIFIBERRY_DACPRO clk Pierre-Louis Bossart
2020-04-09 19:58 ` [RFC PATCH 07/16] clk: hifiberry-dacpro: initial import Pierre-Louis Bossart
2020-04-14 17:31 ` Andy Shevchenko
2020-04-14 18:09 ` Pierre-Louis Bossart
2020-04-15 10:00 ` Andy Shevchenko
2020-04-09 19:58 ` [RFC PATCH 08/16] clk: hifiberry-dacpro: update SDPX/copyright Pierre-Louis Bossart
2020-04-09 19:58 ` [RFC PATCH 09/16] clk: hifiberry-dacpro: style cleanups, use devm_ Pierre-Louis Bossart
2020-04-09 19:58 ` [RFC PATCH 10/16] clk: hifiberry-dacpro: add OF dependency Pierre-Louis Bossart
2020-04-09 19:58 ` [RFC PATCH 11/16] clk: hifiberry-dacpro: transition to _hw functions Pierre-Louis Bossart
2020-04-09 19:58 ` [RFC PATCH 12/16] clk: hifiberry-dacpro: add ACPI support Pierre-Louis Bossart
2020-04-22 9:32 ` Stephen Boyd
2020-04-22 9:47 ` Andy Shevchenko
2020-04-22 9:54 ` Pierre-Louis Bossart
2020-04-22 20:52 ` Stephen Boyd
2020-04-22 21:08 ` Pierre-Louis Bossart
2020-04-09 19:58 ` [RFC PATCH 13/16] clk: hifiberry-dacpro: add "sclk" lookup Pierre-Louis Bossart
2020-04-22 9:35 ` Stephen Boyd
2020-04-22 9:51 ` Pierre-Louis Bossart
2020-04-22 11:54 ` Andy Shevchenko
2020-04-09 19:58 ` [RFC PATCH 14/16] clk: hifiberry-dacpro: toggle GPIOs on prepare/unprepare Pierre-Louis Bossart
2020-04-09 19:58 ` [RFC PATCH 15/16] clk: hifiberry-dacpro: add delay on clock prepare/deprepare Pierre-Louis Bossart
2020-04-09 19:58 ` [RFC PATCH 16/16] ASoC: dt-bindings: add document for Hifiberry DAC+ PRO clock Pierre-Louis Bossart
2020-04-14 17:27 ` Andy Shevchenko
2020-04-14 18:10 ` Pierre-Louis Bossart
2020-04-14 16:50 ` [RFC PATCH 00/16] ASoC/SOF/clk/gpio/dt: add Hifiberry DAC+ PRO support Andy Shevchenko
2020-04-14 16:57 ` Pierre-Louis Bossart
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=4635e57b-fccd-d8a9-fa99-8124debb3428@linux.intel.com \
--to=pierre-louis.bossart@linux.intel.com \
--cc=alsa-devel@alsa-project.org \
--cc=andriy.shevchenko@linux.intel.com \
--cc=bgolaszewski@baylibre.com \
--cc=broonie@kernel.org \
--cc=daniel@hifiberry.com \
--cc=hias@horus.com \
--cc=hui.wang@canonical.com \
--cc=linus.walleij@linaro.org \
--cc=linux-clk@vger.kernel.org \
--cc=linux-gpio@vger.kernel.org \
--cc=mturquette@baylibre.com \
--cc=robh+dt@kernel.org \
--cc=sboyd@kernel.org \
--cc=tiwai@suse.de \
/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;
as well as URLs for NNTP newsgroup(s).