All of lore.kernel.org
 help / color / mirror / Atom feed
From: Takashi Iwai <tiwai@suse.de>
To: Azizul Hakim <azizulfahim2002@gmail.com>
Cc: alsa-devel@alsa-project.org
Subject: Re: Can't Unload ALSA Driver Without Disconnecting the Device
Date: Fri, 12 Jun 2015 08:55:55 +0200	[thread overview]
Message-ID: <s5h381x76v8.wl-tiwai@suse.de> (raw)
In-Reply-To: <CA+k7Wwbr=TE63GLLSbKzCLBeWSSg0EjdLJW-2TXagP5FSgrBLQ@mail.gmail.com>

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)>]
> 

  reply	other threads:[~2015-06-12  6:55 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
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 [this message]
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

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=s5h381x76v8.wl-tiwai@suse.de \
    --to=tiwai@suse.de \
    --cc=alsa-devel@alsa-project.org \
    --cc=azizulfahim2002@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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.