All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Amadeusz Sławiński" <amadeuszx.slawinski@linux.intel.com>
To: Jaroslav Kysela <perex@perex.cz>,
	Cezary Rojewski <cezary.rojewski@intel.com>,
	Takashi Iwai <tiwai@suse.com>, Mark Brown <broonie@kernel.org>
Cc: linux-sound@vger.kernel.org
Subject: Re: [PATCH] ASoC: core: Change device numbering
Date: Fri, 31 Jan 2025 13:41:00 +0100	[thread overview]
Message-ID: <fabca478-69cc-436e-b0c4-2ffec183e66a@linux.intel.com> (raw)
In-Reply-To: <50f5fa11-55f2-4928-97a6-b4758e8d9d52@perex.cz>

On 1/31/2025 10:03 AM, Jaroslav Kysela wrote:
> 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).
> 
So, as I understand you want something like the following and to 
differentiate cards in UCM using component?

# aplay -l
**** List of PLAYBACK Hardware Devices ****
card 0: avshdaudio [avs_hdaudio], device 1: HDAudio Analog (*) []
   Subdevices: 1/1
   Subdevice #0: subdevice #0
card 1: avshdaudio_1 [avs_hdaudio], device 1: HDMI 1 (*) []
   Subdevices: 1/1
   Subdevice #0: subdevice #0
card 1: avshdaudio_1 [avs_hdaudio], device 2: HDMI 2 (*) []
   Subdevices: 1/1
   Subdevice #0: subdevice #0
card 1: avshdaudio_1 [avs_hdaudio], device 3: HDMI 3 (*) []
   Subdevices: 1/1
   Subdevice #0: subdevice #0
root@test-ThinkPad-X1-Carbon-6th:/home/test# cat /proc/asound/cards
  0 [avshdaudio     ]: avs_hdaudio - avs_hdaudio
                       LENOVO-20KH006LPB-ThinkPadX1Carbon6th
  1 [avshdaudio_1   ]: avs_hdaudio - avs_hdaudio
                       LENOVO-20KH006LPB-ThinkPadX1Carbon6th
# alsactl info 0
#
# Sound card
#
- card: 0
   id: avshdaudio
   name: avs_hdaudio
   longname: LENOVO-20KH006LPB-ThinkPadX1Carbon6th
   driver_name: avs_hdaudio
   mixer_name: Realtek ALC285
   components: HDA:10ec0285,17aa225c,00100002
   controls_count: 14
   pcm:
     - stream: PLAYBACK
       devices:
         - device: 1
           id: HDAudio Analog (*)
           name:
           subdevices:
             - subdevice: 0
               name: subdevice #0
     - stream: CAPTURE
       devices:
         - device: 1
           id: HDAudio Analog (*)
           name:
           subdevices:
             - subdevice: 0
               name: subdevice #0
alsactl: rawmidi_device_list:105: snd_ctl_rawmidi_next_device
# alsactl info 1
#
# Sound card
#
- card: 1
   id: avshdaudio_1
   name: avs_hdaudio
   longname: LENOVO-20KH006LPB-ThinkPadX1Carbon6th
   driver_name: avs_hdaudio
   mixer_name: Intel Kabylake HDMI
   components: HDA:8086280b,80860101,00100000
   controls_count: 21
   pcm:
     - stream: PLAYBACK
       devices:
         - device: 1
           id: HDMI 1 (*)
           name:
           subdevices:
             - subdevice: 0
               name: subdevice #0
         - device: 2
           id: HDMI 2 (*)
           name:
           subdevices:
             - subdevice: 0
               name: subdevice #0
         - device: 3
           id: HDMI 3 (*)
           name:
           subdevices:
             - subdevice: 0
               name: subdevice #0
alsactl: rawmidi_device_list:105: snd_ctl_rawmidi_next_device



  reply	other threads:[~2025-01-31 12:41 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-01-27 14:44 [PATCH] ASoC: core: Change device numbering Amadeusz Sławiński
2025-01-27 14:45 ` Amadeusz Sławiński
2025-01-27 14:54   ` Jaroslav Kysela
2025-01-29  9:25     ` Cezary Rojewski
2025-01-29 14:51       ` Amadeusz Sławiński
2025-01-31  9:03         ` Jaroslav Kysela
2025-01-31 12:41           ` Amadeusz Sławiński [this message]
2025-01-31 16:18             ` Jaroslav Kysela
2025-02-11 10:53               ` Amadeusz Sławiński
2025-02-11 13:30                 ` Jaroslav Kysela
2025-02-11 13:33                   ` Takashi Iwai
2025-02-11 13:56                   ` Amadeusz Sławiński
2025-02-11 14:50                     ` Jaroslav Kysela
2025-02-11 15:12                       ` Amadeusz Sławiński
2025-02-12 13:39                         ` 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=fabca478-69cc-436e-b0c4-2ffec183e66a@linux.intel.com \
    --to=amadeuszx.slawinski@linux.intel.com \
    --cc=broonie@kernel.org \
    --cc=cezary.rojewski@intel.com \
    --cc=linux-sound@vger.kernel.org \
    --cc=perex@perex.cz \
    --cc=tiwai@suse.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.