* Can't Unload ALSA Driver Without Disconnecting the Device
@ 2015-06-12 6:28 Azizul Hakim
2015-06-12 6:41 ` Takashi Iwai
0 siblings, 1 reply; 7+ messages in thread
From: Azizul Hakim @ 2015-06-12 6:28 UTC (permalink / raw)
To: alsa-devel
Hi,
I've been developing a sound card driver for a USB device using ALSA. My
driver is almost working but I've got one small issue. If I try to unload
the driver module using "rmmod" command when the device is still connected
to the USB port, it says "Module is in use" even though I'm not playing any
sound files or anything.
If I try to execute the "lsmod" command I see that it is saying the usage
count of my driver to be 1, but it doesn't say anything about who is using
it. Once I disconnect the device from the USB port, I can easily unload the
module.
So it seems to me it won't be possible to unload a sound card driver if the
card is attached in the computer. Is my assumption correct? If not, what
might be some key points to solve the issue?
Thanks for any suggestion
Regards
Azizul Hakim
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: Can't Unload ALSA Driver Without Disconnecting the Device
2015-06-12 6:28 Can't Unload ALSA Driver Without Disconnecting the Device Azizul Hakim
@ 2015-06-12 6:41 ` Takashi Iwai
2015-06-12 6:51 ` Azizul Hakim
0 siblings, 1 reply; 7+ messages in thread
From: Takashi Iwai @ 2015-06-12 6:41 UTC (permalink / raw)
To: Azizul Hakim; +Cc: alsa-devel
At Fri, 12 Jun 2015 02:28:16 -0400,
Azizul Hakim wrote:
>
> Hi,
>
> I've been developing a sound card driver for a USB device using ALSA. My
> driver is almost working but I've got one small issue. If I try to unload
> the driver module using "rmmod" command when the device is still connected
> to the USB port, it says "Module is in use" even though I'm not playing any
> sound files or anything.
>
>
> If I try to execute the "lsmod" command I see that it is saying the usage
> count of my driver to be 1, but it doesn't say anything about who is using
> it. Once I disconnect the device from the USB port, I can easily unload the
> module.
>
>
> So it seems to me it won't be possible to unload a sound card driver if the
> card is attached in the computer. Is my assumption correct? If not, what
> might be some key points to solve the issue?
Check "fuser -v /dev/snd/*" as root. Something (e.g. a mixer
application or sound backend) must be accessing the device.
Takashi
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: Can't Unload ALSA Driver Without Disconnecting the Device
2015-06-12 6:41 ` Takashi Iwai
@ 2015-06-12 6:51 ` Azizul Hakim
2015-06-12 6:55 ` Takashi Iwai
0 siblings, 1 reply; 7+ messages in thread
From: Azizul Hakim @ 2015-06-12 6:51 UTC (permalink / raw)
To: Takashi Iwai; +Cc: alsa-devel
I tried that command. The output is as below:
USER PID ACCESS COMMAND
/dev/snd/controlC0: mhaki005 2043 F.... pulseaudio
/dev/snd/controlC1: mhaki005 2043 F.... pulseaudio
/dev/snd/pcmC0D0c: mhaki005 2043 F...m pulseaudio
I think pcmC0D0c stands for "Capture" device. My device is a playback
device. So I don't think it is being used by anyone.
On Fri, Jun 12, 2015 at 2:41 AM, Takashi Iwai <tiwai@suse.de> wrote:
> At Fri, 12 Jun 2015 02:28:16 -0400,
> Azizul Hakim wrote:
> >
> > Hi,
> >
> > I've been developing a sound card driver for a USB device using ALSA. My
> > driver is almost working but I've got one small issue. If I try to unload
> > the driver module using "rmmod" command when the device is still
> connected
> > to the USB port, it says "Module is in use" even though I'm not playing
> any
> > sound files or anything.
> >
> >
> > If I try to execute the "lsmod" command I see that it is saying the usage
> > count of my driver to be 1, but it doesn't say anything about who is
> using
> > it. Once I disconnect the device from the USB port, I can easily unload
> the
> > module.
> >
> >
> > So it seems to me it won't be possible to unload a sound card driver if
> the
> > card is attached in the computer. Is my assumption correct? If not, what
> > might be some key points to solve the issue?
>
> Check "fuser -v /dev/snd/*" as root. Something (e.g. a mixer
> application or sound backend) must be accessing the device.
>
>
> Takashi
>
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: Can't Unload ALSA Driver Without Disconnecting the Device
2015-06-12 6:51 ` Azizul Hakim
@ 2015-06-12 6:55 ` Takashi Iwai
2015-06-12 6:58 ` Azizul Hakim
[not found] ` <CA+k7WwY9vfXp0sKP-WgtOu6FwRouSd1yh_4Za2xmpiDPwd_wPQ@mail.gmail.com>
0 siblings, 2 replies; 7+ messages in thread
From: Takashi Iwai @ 2015-06-12 6:55 UTC (permalink / raw)
To: Azizul Hakim; +Cc: alsa-devel
At Fri, 12 Jun 2015 02:51:03 -0400,
Azizul Hakim wrote:
>
> I tried that command. The output is as below:
>
> USER PID ACCESS COMMAND
> /dev/snd/controlC0: mhaki005 2043 F.... pulseaudio
> /dev/snd/controlC1: mhaki005 2043 F.... pulseaudio
> /dev/snd/pcmC0D0c: mhaki005 2043 F...m pulseaudio
>
>
> I think pcmC0D0c stands for "Capture" device. My device is a playback
> device. So I don't think it is being used by anyone.
/dev/snd/controlC1 is being used. It's the mixer interface.
Takashi
>
>
> On Fri, Jun 12, 2015 at 2:41 AM, Takashi Iwai <tiwai@suse.de> wrote:
>
> > At Fri, 12 Jun 2015 02:28:16 -0400,
> > Azizul Hakim wrote:
> > >
> > > Hi,
> > >
> > > I've been developing a sound card driver for a USB device using ALSA. My
> > > driver is almost working but I've got one small issue. If I try to unload
> > > the driver module using "rmmod" command when the device is still
> > connected
> > > to the USB port, it says "Module is in use" even though I'm not playing
> > any
> > > sound files or anything.
> > >
> > >
> > > If I try to execute the "lsmod" command I see that it is saying the usage
> > > count of my driver to be 1, but it doesn't say anything about who is
> > using
> > > it. Once I disconnect the device from the USB port, I can easily unload
> > the
> > > module.
> > >
> > >
> > > So it seems to me it won't be possible to unload a sound card driver if
> > the
> > > card is attached in the computer. Is my assumption correct? If not, what
> > > might be some key points to solve the issue?
> >
> > Check "fuser -v /dev/snd/*" as root. Something (e.g. a mixer
> > application or sound backend) must be accessing the device.
> >
> >
> > Takashi
> >
> [2 <text/html; UTF-8 (quoted-printable)>]
>
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: Can't Unload ALSA Driver Without Disconnecting the Device
2015-06-12 6:55 ` Takashi Iwai
@ 2015-06-12 6:58 ` Azizul Hakim
[not found] ` <CA+k7WwY9vfXp0sKP-WgtOu6FwRouSd1yh_4Za2xmpiDPwd_wPQ@mail.gmail.com>
1 sibling, 0 replies; 7+ messages in thread
From: Azizul Hakim @ 2015-06-12 6:58 UTC (permalink / raw)
To: Takashi Iwai; +Cc: alsa-devel
I see. So in this scenario what'll be the way to unload the driver
successfully? Is there a way to stop the mixer interface?
On Fri, Jun 12, 2015 at 2:55 AM, Takashi Iwai <tiwai@suse.de> wrote:
> At Fri, 12 Jun 2015 02:51:03 -0400,
> Azizul Hakim wrote:
> >
> > I tried that command. The output is as below:
> >
> > USER PID ACCESS COMMAND
> > /dev/snd/controlC0: mhaki005 2043 F.... pulseaudio
> > /dev/snd/controlC1: mhaki005 2043 F.... pulseaudio
> > /dev/snd/pcmC0D0c: mhaki005 2043 F...m pulseaudio
> >
> >
> > I think pcmC0D0c stands for "Capture" device. My device is a playback
> > device. So I don't think it is being used by anyone.
>
> /dev/snd/controlC1 is being used. It's the mixer interface.
>
>
> Takashi
>
> >
> >
> > On Fri, Jun 12, 2015 at 2:41 AM, Takashi Iwai <tiwai@suse.de> wrote:
> >
> > > At Fri, 12 Jun 2015 02:28:16 -0400,
> > > Azizul Hakim wrote:
> > > >
> > > > Hi,
> > > >
> > > > I've been developing a sound card driver for a USB device using
> ALSA. My
> > > > driver is almost working but I've got one small issue. If I try to
> unload
> > > > the driver module using "rmmod" command when the device is still
> > > connected
> > > > to the USB port, it says "Module is in use" even though I'm not
> playing
> > > any
> > > > sound files or anything.
> > > >
> > > >
> > > > If I try to execute the "lsmod" command I see that it is saying the
> usage
> > > > count of my driver to be 1, but it doesn't say anything about who is
> > > using
> > > > it. Once I disconnect the device from the USB port, I can easily
> unload
> > > the
> > > > module.
> > > >
> > > >
> > > > So it seems to me it won't be possible to unload a sound card driver
> if
> > > the
> > > > card is attached in the computer. Is my assumption correct? If not,
> what
> > > > might be some key points to solve the issue?
> > >
> > > Check "fuser -v /dev/snd/*" as root. Something (e.g. a mixer
> > > application or sound backend) must be accessing the device.
> > >
> > >
> > > Takashi
> > >
> > [2 <text/html; UTF-8 (quoted-printable)>]
> >
>
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: Can't Unload ALSA Driver Without Disconnecting the Device
[not found] ` <CA+k7WwY9vfXp0sKP-WgtOu6FwRouSd1yh_4Za2xmpiDPwd_wPQ@mail.gmail.com>
@ 2015-06-12 7:01 ` Takashi Iwai
2015-06-12 7:08 ` Azizul Hakim
0 siblings, 1 reply; 7+ messages in thread
From: Takashi Iwai @ 2015-06-12 7:01 UTC (permalink / raw)
To: Azizul Hakim; +Cc: alsa-devel
At Fri, 12 Jun 2015 02:57:27 -0400,
Azizul Hakim wrote:
>
> I see. So in this scenario what'll be the way to unload the driver
> successfully? Is there a way to stop the mixer interface?
Kill pulseaudio properly. It'll auto respawn itself usually, so for
killing PA, you'd have to change the PA configuration.
Takashi
>
> On Fri, Jun 12, 2015 at 2:55 AM, Takashi Iwai <tiwai@suse.de> wrote:
>
> > At Fri, 12 Jun 2015 02:51:03 -0400,
> > Azizul Hakim wrote:
> > >
> > > I tried that command. The output is as below:
> > >
> > > USER PID ACCESS COMMAND
> > > /dev/snd/controlC0: mhaki005 2043 F.... pulseaudio
> > > /dev/snd/controlC1: mhaki005 2043 F.... pulseaudio
> > > /dev/snd/pcmC0D0c: mhaki005 2043 F...m pulseaudio
> > >
> > >
> > > I think pcmC0D0c stands for "Capture" device. My device is a playback
> > > device. So I don't think it is being used by anyone.
> >
> > /dev/snd/controlC1 is being used. It's the mixer interface.
> >
> >
> > Takashi
> >
> > >
> > >
> > > On Fri, Jun 12, 2015 at 2:41 AM, Takashi Iwai <tiwai@suse.de> wrote:
> > >
> > > > At Fri, 12 Jun 2015 02:28:16 -0400,
> > > > Azizul Hakim wrote:
> > > > >
> > > > > Hi,
> > > > >
> > > > > I've been developing a sound card driver for a USB device using
> > ALSA. My
> > > > > driver is almost working but I've got one small issue. If I try to
> > unload
> > > > > the driver module using "rmmod" command when the device is still
> > > > connected
> > > > > to the USB port, it says "Module is in use" even though I'm not
> > playing
> > > > any
> > > > > sound files or anything.
> > > > >
> > > > >
> > > > > If I try to execute the "lsmod" command I see that it is saying the
> > usage
> > > > > count of my driver to be 1, but it doesn't say anything about who is
> > > > using
> > > > > it. Once I disconnect the device from the USB port, I can easily
> > unload
> > > > the
> > > > > module.
> > > > >
> > > > >
> > > > > So it seems to me it won't be possible to unload a sound card driver
> > if
> > > > the
> > > > > card is attached in the computer. Is my assumption correct? If not,
> > what
> > > > > might be some key points to solve the issue?
> > > >
> > > > Check "fuser -v /dev/snd/*" as root. Something (e.g. a mixer
> > > > application or sound backend) must be accessing the device.
> > > >
> > > >
> > > > Takashi
> > > >
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: Can't Unload ALSA Driver Without Disconnecting the Device
2015-06-12 7:01 ` Takashi Iwai
@ 2015-06-12 7:08 ` Azizul Hakim
0 siblings, 0 replies; 7+ messages in thread
From: Azizul Hakim @ 2015-06-12 7:08 UTC (permalink / raw)
To: Takashi Iwai; +Cc: alsa-devel
Thanks. It was a great help :)
On Fri, Jun 12, 2015 at 3:01 AM, Takashi Iwai <tiwai@suse.de> wrote:
> At Fri, 12 Jun 2015 02:57:27 -0400,
> Azizul Hakim wrote:
> >
> > I see. So in this scenario what'll be the way to unload the driver
> > successfully? Is there a way to stop the mixer interface?
>
> Kill pulseaudio properly. It'll auto respawn itself usually, so for
> killing PA, you'd have to change the PA configuration.
>
>
> Takashi
>
> >
> > On Fri, Jun 12, 2015 at 2:55 AM, Takashi Iwai <tiwai@suse.de> wrote:
> >
> > > At Fri, 12 Jun 2015 02:51:03 -0400,
> > > Azizul Hakim wrote:
> > > >
> > > > I tried that command. The output is as below:
> > > >
> > > > USER PID ACCESS COMMAND
> > > > /dev/snd/controlC0: mhaki005 2043 F.... pulseaudio
> > > > /dev/snd/controlC1: mhaki005 2043 F.... pulseaudio
> > > > /dev/snd/pcmC0D0c: mhaki005 2043 F...m pulseaudio
> > > >
> > > >
> > > > I think pcmC0D0c stands for "Capture" device. My device is a playback
> > > > device. So I don't think it is being used by anyone.
> > >
> > > /dev/snd/controlC1 is being used. It's the mixer interface.
> > >
> > >
> > > Takashi
> > >
> > > >
> > > >
> > > > On Fri, Jun 12, 2015 at 2:41 AM, Takashi Iwai <tiwai@suse.de> wrote:
> > > >
> > > > > At Fri, 12 Jun 2015 02:28:16 -0400,
> > > > > Azizul Hakim wrote:
> > > > > >
> > > > > > Hi,
> > > > > >
> > > > > > I've been developing a sound card driver for a USB device using
> > > ALSA. My
> > > > > > driver is almost working but I've got one small issue. If I try
> to
> > > unload
> > > > > > the driver module using "rmmod" command when the device is still
> > > > > connected
> > > > > > to the USB port, it says "Module is in use" even though I'm not
> > > playing
> > > > > any
> > > > > > sound files or anything.
> > > > > >
> > > > > >
> > > > > > If I try to execute the "lsmod" command I see that it is saying
> the
> > > usage
> > > > > > count of my driver to be 1, but it doesn't say anything about
> who is
> > > > > using
> > > > > > it. Once I disconnect the device from the USB port, I can easily
> > > unload
> > > > > the
> > > > > > module.
> > > > > >
> > > > > >
> > > > > > So it seems to me it won't be possible to unload a sound card
> driver
> > > if
> > > > > the
> > > > > > card is attached in the computer. Is my assumption correct? If
> not,
> > > what
> > > > > > might be some key points to solve the issue?
> > > > >
> > > > > Check "fuser -v /dev/snd/*" as root. Something (e.g. a mixer
> > > > > application or sound backend) must be accessing the device.
> > > > >
> > > > >
> > > > > Takashi
> > > > >
>
^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~2015-06-12 7:08 UTC | newest]
Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-06-12 6:28 Can't Unload ALSA Driver Without Disconnecting the Device Azizul Hakim
2015-06-12 6:41 ` Takashi Iwai
2015-06-12 6:51 ` Azizul Hakim
2015-06-12 6:55 ` Takashi Iwai
2015-06-12 6:58 ` Azizul Hakim
[not found] ` <CA+k7WwY9vfXp0sKP-WgtOu6FwRouSd1yh_4Za2xmpiDPwd_wPQ@mail.gmail.com>
2015-06-12 7:01 ` Takashi Iwai
2015-06-12 7:08 ` Azizul Hakim
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.