Re: [PATCH] ASoC: core: Change device numbering

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]



On 29. 01. 25 15:51, Amadeusz Sławiński wrote:
On 1/29/2025 10:25 AM, Cezary Rojewski wrote:
On 2025-01-27 3:54 PM, Jaroslav Kysela wrote:
On 27. 01. 25 15:45, Amadeusz Sławiński wrote:

...

Also, a bit off-topic, but the driver name (hdaudioB?D?) for this
particular driver should be corrected, too. It should be like 'hda-
avs- dsp' or so. If I am not wrong, the SST driver name was 'hda-dsp'.

We had a discussion or two within the team and yes, we do agree that a
more user-friendly pattern should be provided. Currently card names are
mostly based on machine board device (platform_device) name. There is no
strong technical argument for that - the development was/is simply
focused on bringing new functionality and we did not prioritize the card
naming.

The task touches all interfaces though, not just HDA. We would like to
streamline or fix the naming for all the interfaces. This time we will
specifically request a review for that : )

And we had yet another discussion today ;) Are there some guidelines
upstream, about how cards should be named? Currently we need names for:
I am not aware of any documentation, but it should be user friendly and meaningful. I am talking about driver name not other UI parts, but they should be probably corrected, too.

The driver name is more related to the kernel module name and it should just identify the affected driver not runtime (like addressing). Runtime descriptors should be put to the components string.

HDA, HDMI, DMIC & I2S cards. Here are examples from running systems:
HDA:
card 0: hdaudioB0D0 [hdaudioB0D0], device 1: HDAudio Analog (*) []
HDMI:
card 1: hdaudioB0D2 [hdaudioB0D2], device 1: HDMI 0 (*) []
DMIC:
card 2: avsdmic [avs_dmic], device 2: Digital Microphone (*) []
I2S:
card 3: avsrt274 [avs_rt274], device 1: Audio (*) []

You should probably show all card info strings ('cat /proc/asound/cards' or 'alsactl info 0').

There are basically four strings:

1) driver name (used for alsa-lib / ucm configs)
2) card short name (for UI)
3) card long name (for UI)
4) card components (more precise driver/hw identification)

The components string can be printed using 'amixer -c 0 info' or 'alsactl info 0' command.

I think that in your case, you just set the short name which is copied to the driver name in the ASoC core. The avs_dmic/avs_rt274 names seems fine, but only the hdaudioB?C? names are really mess (including card short name).

Additionally is there a way to alias card name? We would like to still
allow users to use current names, to keep backward compatibility at
least for some time.

We don't have this possibility in the kernel API. For user space (alsa-lib, UCM) we can use symlinks. As I already suggested, it would be probably best to create CONFIG_XXXXX_OBSOLETE option which can be turned on by default with proper description and let distribution maintainers to turn it off when alsa-lib / UCM / whatever related configs are updated in the user space.

					Jaroslav

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




[Index of Archives]     [Pulseaudio]     [Linux Audio Users]     [ALSA Devel]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]

  Powered by Linux