Bug 3487 - sound-scripts should be reworked along this discussion
Summary: sound-scripts should be reworked along this discussion
Status: CLOSED WONTFIX
Alias: None
Product: Sisyphus
Classification: Development
Component: sound-scripts (show other bugs)
Version: unstable
Hardware: all Linux
: P5 enhancement
Assignee: Michael Shigorin
QA Contact: qa-sisyphus
URL: http://www.geocrawler.com/archives/3/...
Keywords:
Depends on:
Blocks: 8212
  Show dependency tree
 
Reported: 2004-01-14 12:45 MSK by Michael Shigorin
Modified: 2007-06-11 21:53 MSD (History)
5 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Michael Shigorin 2004-01-14 12:45:00 MSK
> Thanks for the info.  I still think it's a bandaid though: the real problem
> is that the logic in the init script is broken.  Anything that causes modules
> to be loaded before the init script is run breaks the script, as far as I can
> see.  For example: compiling into the kernel, i.e. not as modules ; using
> hardware detection software that autoloads sound card drivers ; using usb
> audio...  In these cases /proc/asound will exist when the init script is run,
> and mixer settings will not be restored, card specific scripts will not be run
etc.
> 
> In the long term (2.6 kernel) I am imagining the following:
> 
> (1) the init script just loads modules.
> (2) when modules are loaded, whether for a pci card, a usb one whatever,
> the hotplug subsystem is called: it restores mixer settings for the card and
> runs card specific scripts.

except for the check of /proc/asound, the hotplug problem can be
sorted to the following:

1. hotplug may be called before alsa init script.

2. hotplug needs to manage the mixer configuration of plugged /
   unplugged devices dynamically.

3. alsa initscript itself should be independent from hotplug.

they are not all but certainly a major part of the problems.


the first one is not easy, because the network devices can belong to
hotplug, too.  the scenario is like this:
  many alsa files are located under /usr
    -> a networkfs (e.g. NFS) is required before the alsa service
      -> the network must be initialized in prior
        -> the network base = hotplug is needed to run before alsa!

the second problem is also tough.
alsa driver needs to access the device to get the current mixer
values, but at the remove callback of hotplug, the device was actually
unplugged...  probably implementing cache would be necessary.

the third one is obvious.
i don't think it's good to let hotplug initialize the pci cards, too.
for example, if i don't have any usb devices, i'd like to remove
hotplug.  but if alsa initscript rely on the hotplug stuff, i cannot
do that.  that's bad.

well, still many obstacles ahead.
i'd love to see a perfect solution :)


Takashi
Comment 1 Michael Shigorin 2004-01-22 09:11:32 MSK
should have found myself e.g. onboard+soundcard+usb mix to test...
Comment 2 Michael Shigorin 2007-06-11 21:53:09 MSD
Думаю, неактуально.  Модули нынче грузит всё равно udevd.