Skip to contentSkip to conversation

Question regarding ALSA modules parameters

DISCUSSION Ivan Orlov 2 participants 3 messages May 1, 2023 – May 3, 2023

lore
Share & tools
lore

Ivan Orlov

author
#0 lore raw

Hello!

I have a question about the typical ALSA driver parameters, and maybe someone can answer me. Why it is necessary for ALSA module to have "index", "id" and "enable" parameters? They are mentioned as required in the "Writing an ALSA driver" and "Advanced Linux Sound Architecture - Driver Configuration guide" articles and used in many ALSA drivers, but for what purpose?

Kind regards,
Ivan Orlov.

#1 lore raw
Quoted 9 lines · Ivan Orlov

Hello!

I have a question about the typical ALSA driver parameters, and maybe someone can answer me. Why it is necessary for ALSA module to have "index", "id" and "enable" parameters? They are mentioned as required in the "Writing an ALSA driver" and "Advanced Linux Sound Architecture
- Driver Configuration guide" articles and used in many ALSA drivers, but for what purpose?

It's for either specifying the order of instances or controlling enable/disable of each one when there are multiple devices bound with the same driver. One of typical use cases would be the HD-audio driver; there are many machines that have two HD-audio controllers, one for HDMI/DP audio and another for onboard analog. In most cases, the second one (onboard analog) is the primary usage, and people would like to assign this as the first appearing card. Then you can pass the option like "index=1,0" to swap the assignment slot.

Nowadays with the sound backend like PA or PW that supports dynamic configuration, it's little use, but that was a help for static configuration in the past.

HTH,

Takashi

author
#2 lore raw
Quoted 9 lines · Takashi Iwai

It's for either specifying the order of instances or controlling enable/disable of each one when there are multiple devices bound with the same driver. One of typical use cases would be the HD-audio driver; there are many machines that have two HD-audio controllers, one for HDMI/DP audio and another for onboard analog. In most cases, the second one (onboard analog) is the primary usage, and people would like to assign this as the first appearing card. Then you can pass the option like "index=1,0" to swap the assignment slot.

Quoted 8 lines

Nowadays with the sound backend like PA or PW that supports dynamic configuration, it's little use, but that was a help for static configuration in the past.

HTH,

Takashi

Thank you for the response! Now it is clear.

Kind regards,
Ivan Orlov.