Bug 48831 - Please, implement pid/vid across all ALSA drivers, but on snd-hda-intel at first
Summary: Please, implement pid/vid across all ALSA drivers, but on snd-hda-intel at first
Status: RESOLVED WILL_NOT_FIX
Alias: None
Product: Drivers
Classification: Unclassified
Component: Sound(ALSA) (show other bugs)
Hardware: All Linux
: P1 enhancement
Assignee: Jaroslav Kysela
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-10-15 10:44 UTC by Artem S. Tashkinov
Modified: 2013-11-14 17:02 UTC (History)
1 user (show)

See Also:
Kernel Version: 3.0
Subsystem:
Regression: No
Bisected commit-id:


Attachments

Description Artem S. Tashkinov 2012-10-15 10:44:35 UTC
Configuring a default sound card via ~/.asoundrc is not the best solution, so I'd be very glad to have pid= vid= for the snd-hda-intel driver (and all others too but it's not urgent).
Comment 1 Artem S. Tashkinov 2012-12-18 13:58:28 UTC
Guys, do you even consider adding it?
Comment 2 Jaroslav Kysela 2012-12-18 16:20:58 UTC
You may reorder cards using 'options snd-hda-intel index=1,0'.

Or what's your motivation to add pid/vid checks to this module?
Comment 3 Artem S. Tashkinov 2012-12-18 18:45:27 UTC
(In reply to comment #2)
> You may reorder cards using 'options snd-hda-intel index=1,0'.
> 
> Or what's your motivation to add pid/vid checks to this module?

snd-hda-intel applies both to the internal on-board Realtek HDA codec and to the HDA codec on my AMD Radeon card and the only reliable way to control the order in which sound cards appear for ALSA applications is to write rather complicated udev rules (http://alsa.opensrc.org/Udev).
Comment 4 Jaroslav Kysela 2012-12-18 21:51:14 UTC
(In reply to comment #3)
> (In reply to comment #2)
> > You may reorder cards using 'options snd-hda-intel index=1,0'.
> > 
> > Or what's your motivation to add pid/vid checks to this module?
> 
> snd-hda-intel applies both to the internal on-board Realtek HDA codec and to
> the HDA codec on my AMD Radeon card and the only reliable way to control the
> order in which sound cards appear for ALSA applications is to write rather
> complicated udev rules (http://alsa.opensrc.org/Udev).

The pci detection order is fixed, so the card index swap should be stable. Have you tried it? Add the above rule somewhere to /etc/modprobe.d .
Comment 5 Artem S. Tashkinov 2012-12-19 07:23:01 UTC
(In reply to comment #4)
> 
> The pci detection order is fixed, so the card index swap should be stable.
> Have
> you tried it? Add the above rule somewhere to /etc/modprobe.d .

It's probably stable, but

1) If I add a new device which is served by snd-hda-intel everything can go kaboom.

2) Vid/Pid will allow precise control over this perceived randomness.

3) "options snd-hda-intel index=1,0" is very non-obvious and non-informative - you just cannot read it and understand right away what applies to what.

If you are not interested in adding this feature, then just close this bug report. :-(
Comment 6 Takashi Iwai 2013-11-14 17:02:38 UTC
The order doesn't have to be controlled in the kernel level.  What we should improve is rather the enumeration of devices in user-space side, and allow the persistent device name for the default card definition.

Note You need to log in before you can comment on or make changes to this bug.