[alsa-devel] Can not rmmod snd_hda_codec_hdmi
Xuebing Wang
xbing6 at gmail.com
Wed Dec 24 14:07:54 CET 2014
On 三, 2014-12-24 at 21:28 +0900, Takashi Sakamoto wrote:
> On Dec 24 2014 20:54, Xuebing Wang wrote:
> > Anssi, thanks for your help.
> >
> > 1) In Fedora 21 (kernel 3.17.4),
> > 'fuser -v /dev/snd/*' shows below:
> > /dev/snd/controlC0: xbing 2400 F.... pulseaudio
> > /dev/snd/controlC1: xbing 2400 F.... pulseaudio
> > /dev/snd/pcmC0D3p: xbing 2400 F...m pulseaudio
> > /dev/snd/pcmC1D0c: xbing 2400 F...m pulseaudio
> > /dev/snd/pcmC1D0p: xbing 2400 F...m pulseaudio
> >
> > After 'pulseaudio --kill' to kill pulseaudio (after disable autospawn),
> > lsmod shows refcount of snd_hda_intel is down from 7 to 2 as below:
> > $ lsmod | grep hda_intel
> > snd_hda_intel 30479 2
> >
> > 'rmmod snd_hda_intel' still shows this module is in use.
> >
> > 2) But, in Ubuntu 14.04.1 (kernel 3.13.0) DOES work after 'pulseaudio --kill', because lsmod shows refcount of snd_hda_intel is 5.
> >
> > Any suggestions? Could it be because of kernel difference 3.17.4 vs 3.13.0?
>
> In Ubuntu, pulseaudio process re-run even if you kill the process. See:
> https://wiki.ubuntu.com/PulseAudio/Log
>
> But in this case, you don't need to kill pulseaudio. You just set 'off'
> for card profile, or unload alsa-card module. Then these character
> devices are released.
>
> The way to set card profile:
> $ pactl list cards | grep Card
> Card #3
> $ pactl set-card-profile 3 off
>
> Or use 'configuration' tab in pavucontrol GUI. In Ubuntu, this
> application is released by 'pavucontrol' package.
>
> The way to unload alsa-card module:
> $ pactl list modules | grep alsa
> (... you can see module-alsa-card is loaded.)
> $ pactl unload-module module-alsa-card
> $ pactl list modules | grep alsa
> (... you can see module-alsa-card is unloaded.)
Sakamoto-san, thank you very much for your sophisticated way, it helps.
1) I am sorry that I forgot to mention that I disabled 'pulseaudio
autospawn' in Ubuntu too, as I disabled 'pulseaudio autospawn' in
Fedora. Both simply 'pulseaudio --kill' (after disable autospawn) and
your sophisticated way can get down refcount of snd_hda_intel from 5 to
0, then I can rmmod snd_hda_intel.
2) However, in Fedora, 'pulseaudio --kill' or your way can get refcount
of snd_hda_intel from 7 to 2 (5 decreased). Any suggestions how to
decrease the rest 2 refcount?
3) I did try to build tag 3.13 from mainline kernel (using Fedora 3.17.4
config file) and tried 3.13 kernel on Fedora, and got the same result
(refcount of snd_hda_intel is down from 7 to 2).
It seems something in Fedora (either Fedora kernel or application) is
using snd_hda_intel.
Thanks again.
> Regards
>
> Takashi Sakamoto
> o-takashi at sakamocchi.jp
>
More information about the Alsa-devel
mailing list