From: Takashi Iwai Subject: Re: HD-audio modularization Date: Mon, 09 Feb 2009 10:05:14 +0100 Message-ID: References: <20090208112013.6fbb9c2e@schatten> <20090209093934.26945a82@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 mx2.suse.de (mx2.suse.de [195.135.220.15]) by alsa0.perex.cz (Postfix) with ESMTP id 9DF0C1037F5 for ; Mon, 9 Feb 2009 10:05:14 +0100 (CET) In-Reply-To: <20090209093934.26945a82@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 Mon, 9 Feb 2009 09:39:34 +0100, Florian Mickler wrote: > > Hi! > > > 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 > > Yeah, it _is_ stupid to unload modules at shutdown. (and I kicked it > out of my init-script... but one wonders how it's supposed to work) > > modprobe -r snd_hda_codec_analog > gives me an error (''in use'') The codec driver is indeed used by the controller driver, snd-hda-intel. Takashi > # lsmod | grep snd_; modprobe -r snd_hda_codec_analog > snd_pcm_oss 42112 0 > snd_mixer_oss 16224 1 snd_pcm_oss > snd_hda_codec_analog 78144 1 > snd_hda_intel 28264 0 > snd_hda_codec 68992 2 snd_hda_codec_analog,snd_hda_intel > snd_pcm 86440 3 snd_pcm_oss,snd_hda_intel,snd_hda_codec > snd_timer 23472 1 snd_pcm > snd_page_alloc 10288 2 snd_hda_intel,snd_pcm > FATAL: Module snd_hda_codec_analog is in use. > > ...so, if i accidentially don't unload snd_hda_intel before > snd_hda_codec_analog it doesn't work? or are my tools somehow broken?