From: Takashi Iwai Subject: Re: HD-audio modularization Date: Mon, 09 Feb 2009 08:35:21 +0100 Message-ID: References: <20090208112013.6fbb9c2e@schatten> Mime-Version: 1.0 (generated by SEMI 1.14.6 - "Maruoka") Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: Received: from mx1.suse.de (ns.suse.de [195.135.220.2]) by alsa0.perex.cz (Postfix) with ESMTP id 933961037F5 for ; Mon, 9 Feb 2009 08:35:21 +0100 (CET) In-Reply-To: <20090208112013.6fbb9c2e@schatten> List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: alsa-devel-bounces@alsa-project.org Errors-To: alsa-devel-bounces@alsa-project.org To: Florian Mickler Cc: alsa-devel@alsa-project.org List-Id: alsa-devel@alsa-project.org At Sun, 8 Feb 2009 11:20:13 +0100, Florian Mickler wrote: > > On Wed, 03 Dec 2008 15:25:02 +0100 > Takashi Iwai wrote: > > > At Fri, 28 Nov 2008 11:34:35 +0100, > > I wrote: > > > A known issue is that "alsasound stop" may not work with this > > > because of the explicit module refcount without dependency. But > > > it's a script problem, basically. The similar problem must be > > > there for snd-aoa, for example, too. > > > > FYI, the hda-modularization patches are now merged to master branch > > on sound git tree. The snapshot tarball includes this change as well. > > Hey! My system doesn't shutdown anymore! And i found it is the > alsasound-stop problem. > > Is there no way to have snd_hda_intel listed in the used-by column of > lsmod for snd_hda_codec_analog ? > > how should that ''script problem'' be solved? > > up until now, the gentoo-initscript takes the lsmod output and removes > recursively the dependancies of the /^snd_/ modules. > > a simple shootdown-script doesn't work: For example, the recent SUSE init script has the following mod=$(grep -m1 -E '^(snd[^ ]*|ac97_bus) [0-9]+ 0' /proc/modules) while [ -n "$mod" ]; do mod=${mod%% *} /sbin/modprobe -r $mod mod=$(grep -m1 -E '^(snd[^ ]*|ac97_bus) [0-9]+ 0' /proc/modules) done But, basically it's stupid to unload modules at shtudown/reboot, just a waste of time. If possible, you should check the next runlevel and skip unloading if unnecessary. Takashi