All of lore.kernel.org
 help / color / mirror / Atom feed
From: Felipe Ferreri Tonello <eu@felipetonello.com>
To: Ricard Wanderlof <ricard.wanderlof@axis.com>,
	alsa-devel <alsa-devel@alsa-project.org>
Subject: Re: Unregister a card from userspace?
Date: Mon, 9 Nov 2015 11:24:09 +0000	[thread overview]
Message-ID: <56408259.2030604@felipetonello.com> (raw)
In-Reply-To: <alpine.DEB.2.02.1511041032180.1465@lnxricardw1.se.axis.com>

Hi Ricard,

On 04/11/15 09:36, Ricard Wanderlof wrote:
>
> A sound card driver would normally call snd_soc_register_card() to
> register its sound card with ALSA.
>
> Is there some way to unregister the card from userspace?

No. ALSA API to deal with cards are in kernel space only.

>
> My use case is that I have a card driver I'm working on as a module, and
> while insmodding it works fine, I can't rmmod it because once
> snd_soc_register_card() has been called, it has a usage count of 2 and
> thus cannot be rmmod:ed.

You have to unregister that card upon freeing your module.

-- 
Felipe

  parent reply	other threads:[~2015-11-09 11:24 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-11-04  9:36 Unregister a card from userspace? Ricard Wanderlof
2015-11-04 11:24 ` Clemens Ladisch
2015-11-12 13:07   ` Ricard Wanderlof
2015-11-12 13:26     ` Lars-Peter Clausen
2015-11-12 15:38       ` Ricard Wanderlof
2015-11-09 11:24 ` Felipe Ferreri Tonello [this message]
2015-11-10  7:55   ` Ricard Wanderlof
2015-11-11 10:34     ` Felipe Ferreri Tonello
2015-11-11 12:59       ` Ricard Wanderlof
2015-11-11 13:09         ` Lars-Peter Clausen
2015-11-11 15:24           ` Ricard Wanderlof
2015-11-11 14:50         ` Felipe Ferreri Tonello
2015-11-11 15:33           ` Ricard Wanderlof
2015-11-12 10:31             ` Felipe Ferreri Tonello
2015-11-12 14:02               ` Ricard Wanderlof

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=56408259.2030604@felipetonello.com \
    --to=eu@felipetonello.com \
    --cc=alsa-devel@alsa-project.org \
    --cc=ricard.wanderlof@axis.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.