From: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
To: Jaroslav Kysela <perex@perex.cz>, Mark Brown <broonie@kernel.org>
Cc: Takashi Iwai <tiwai@suse.de>,
ALSA development <alsa-devel@alsa-project.org>,
Srinivas Kandagatla <srinivas.kandagatla@linaro.org>
Subject: Re: ASoC driver names
Date: Thu, 23 Apr 2020 11:17:30 -0500 [thread overview]
Message-ID: <7b44a625-fe88-5eac-280f-daa15a7c83dc@linux.intel.com> (raw)
In-Reply-To: <e31a20e6-91ab-2f30-f496-064bea07762a@perex.cz>
> +#ifdef CONFIG_SND_SOC_DRIVER_NAMES
> + if (!card->driver_name) {
> + dev_warn(card->dev,
> + "ASoC: Card driver does not set the driver name\n");
> + return -EINVAL;
> + }
I am all for Jaroslav's proposal of making the driver name the basis for
UCM identification. we've been working on this since e.g. the addition
of the sof- prefix creates a driver name that makes no sense after a
truncation of the card name to 16 characters [1] [2] - still WIP.
Making the card name more user-friendly is also a good thing, there's
also a nice hidden feature when the card name contains spaces, the last
word - typically the codec - is used for the card ID.
But reporting an error when the driver name is not set is a bit extreme
and would break all Intel boards. I think we want to encourage people to
move to the suggested solution, but do we want to break existing setups?
I must admit I also don't see a generic solution when the card is
generated from a DT description, it's not straightforward to translate
parsed elements into human-readable ones.
While I am at it, I think we should probably avoid using the DMI
information for the long card name. It's just awful. It might be a
better idea to add it in the component strings (if it fits) so that UCM
can use it internally, but it's really horrible. Even with the clean-ups
suggested by Jaroslav I ended-up with this horror of a long name on my
test device:
root@Zotac:~# cat /proc/asound/cards
0 [rt5640 ]: SOF - sof-bytcht rt5640
ZOTAC-XXXXXX-XX-CherryTrailFFD
If we really wanted to be user-friendly we'd use something like
"SOF card for Baytrail/Cherrytrail devices with Realtek RT5640 codec"
and apply the same pattern for all machine drivers.
[1] https://github.com/thesofproject/linux/pull/2021
[2]
https://github.com/alsa-project/alsa-ucm-conf/pull/20/commits/4cc7fe4493c237253cb43cf7d33c32ec975a0691
next prev parent reply other threads:[~2020-04-23 16:33 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-04-22 17:04 ASoC driver names Jaroslav Kysela
2020-04-22 20:23 ` Takashi Iwai
2020-04-23 11:04 ` Mark Brown
2020-04-23 11:19 ` Jaroslav Kysela
2020-04-23 16:13 ` Mark Brown
2020-04-23 16:17 ` Pierre-Louis Bossart [this message]
2020-04-23 18:40 ` Mark Brown
2020-04-24 8:52 ` Jaroslav Kysela
2020-04-24 16:49 ` Mark Brown
2020-04-24 17:11 ` Jaroslav Kysela
2020-04-24 18:15 ` Mark Brown
2020-04-24 19:03 ` Jaroslav Kysela
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=7b44a625-fe88-5eac-280f-daa15a7c83dc@linux.intel.com \
--to=pierre-louis.bossart@linux.intel.com \
--cc=alsa-devel@alsa-project.org \
--cc=broonie@kernel.org \
--cc=perex@perex.cz \
--cc=srinivas.kandagatla@linaro.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