lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <ef59dad1-b06e-1d90-5948-9bb6e79478a2@perex.cz>
Date:   Fri, 21 May 2021 10:54:17 +0200
From:   Jaroslav Kysela <perex@...ex.cz>
To:     Mark Brown <broonie@...nel.org>
Cc:     Dmitry Osipenko <digetx@...il.com>,
        Thierry Reding <thierry.reding@...il.com>,
        Jonathan Hunter <jonathanh@...dia.com>,
        Takashi Iwai <tiwai@...e.com>, Ion Agorria <ion@...rria.com>,
        Svyatoslav Ryhel <clamor95@...il.com>,
        Liam Girdwood <lgirdwood@...il.com>,
        alsa-devel@...a-project.org, linux-tegra@...r.kernel.org,
        linux-kernel@...r.kernel.org
Subject: Re: [PATCH v2 2/2] ASoC: tegra: Unify ASoC machine drivers

Dne 20. 05. 21 v 21:08 Mark Brown napsal(a):
> On Thu, May 20, 2021 at 09:02:49PM +0200, Jaroslav Kysela wrote:
>> Dne 20. 05. 21 v 19:50 Dmitry Osipenko napsal(a):
>>> Squash all machine drivers into a single-universal one. This reduces
>>> code duplication, eases addition of a new drivers and upgrades older
>>> code to a modern Linux kernel APIs.
> 
>>> +static struct snd_soc_card snd_soc_tegra_wm9712 = {
>>> +	.dai_link = &tegra_wm9712_dai,
>>> +	.num_links = 1,
>>> +	.fully_routed = true,
>>> +};
> 
>> Please, could you also initialize snd_soc_card->components? It may be useful
>> to pass the codec identification to the user space like:
> 
>> .components = "codec:wm9712"
> 
> Hrm, if this is important to userspace shouldn't the core be doing
> something by default given that it already knows all the components
> going into the card?

I don't think that we can pass the complex topology in the simple string (127
chars). For the time, it's better to pass only the vital information which the
user space requires for the fine-grained hw configuration detection and
description.

For the above example, the "codec:" prefix may be replaced by the purpose
string (like "hs:" - headset, "spk:" - speaker) etc. This information is not
available in the ASoC components (purpose / location / exact I/O config etc.).

>> The passed information should be consistent. You may look into the Intel ASoC
>> drivers for the examples (card->components initialization). There are also
>> hints about the number of connected microphones ("cfg-mic:2" - configuration
>> with 2 microphones) or the codec purpose ("hs:rt711" - headset codec is RT711)
>> etc.
> 
> This sort of stuff is more something that the card should layer on top.

It would be nice to have this layer with the topology description, but until
someone designs it, it's much easier to describe the configuration and hints
in the simple string passed to the user space.

Actually, for ACPI/PCI platforms, the information is gathered from the tables
or detected by PCI IDs. For the device tree. It may be worth to allow to pass
this string from the device tree, too. I believe that the DT config author has
enough information to describe the hardware.

						Jaroslav

-- 
Jaroslav Kysela <perex@...ex.cz>
Linux Sound Maintainer; ALSA Project; Red Hat, Inc.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ