From: Daniel Mack <zonque@gmail.com>
To: alsa-devel@alsa-project.org
Cc: gdiffey@gmail.com, tiwai@suse.de, clemens@ladisch.de,
linuxaudio@showlabor.de, Daniel Mack <zonque@gmail.com>,
blablack@gmail.com
Subject: [PATCH 1/6] ALSA: snd-usb: add snd_usb_audio-wide mutex
Date: Thu, 12 Apr 2012 13:51:10 +0200 [thread overview]
Message-ID: <1334231475-20980-2-git-send-email-zonque@gmail.com> (raw)
In-Reply-To: <1334231475-20980-1-git-send-email-zonque@gmail.com>
This is needed for new card-wide list operations.
Signed-off-by: Daniel Mack <zonque@gmail.com>
---
sound/usb/card.c | 2 ++
sound/usb/usbaudio.h | 1 +
2 files changed, 3 insertions(+), 0 deletions(-)
diff --git a/sound/usb/card.c b/sound/usb/card.c
index 4a7be7b..6bc88b7 100644
--- a/sound/usb/card.c
+++ b/sound/usb/card.c
@@ -276,6 +276,7 @@ static int snd_usb_create_streams(struct snd_usb_audio *chip, int ctrlif)
static int snd_usb_audio_free(struct snd_usb_audio *chip)
{
+ mutex_destroy(&chip->mutex);
kfree(chip);
return 0;
}
@@ -336,6 +337,7 @@ static int snd_usb_audio_create(struct usb_device *dev, int idx,
return -ENOMEM;
}
+ mutex_init(&chip->mutex);
mutex_init(&chip->shutdown_mutex);
chip->index = idx;
chip->dev = dev;
diff --git a/sound/usb/usbaudio.h b/sound/usb/usbaudio.h
index 3e2b035..a16c21d 100644
--- a/sound/usb/usbaudio.h
+++ b/sound/usb/usbaudio.h
@@ -36,6 +36,7 @@ struct snd_usb_audio {
struct snd_card *card;
struct usb_interface *pm_intf;
u32 usb_id;
+ struct mutex mutex;
struct mutex shutdown_mutex;
unsigned int shutdown:1;
unsigned int probing:1;
--
1.7.7.6
next prev parent reply other threads:[~2012-04-12 11:51 UTC|newest]
Thread overview: 26+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-04-12 11:51 [PATCH 0/6] snd-usb endpoint rework, version 7 Daniel Mack
2012-04-12 11:51 ` Daniel Mack [this message]
2012-04-12 11:51 ` [PATCH 2/6] ALSA: snd-usb: implement new endpoint streaming model Daniel Mack
2012-04-12 11:51 ` [PATCH 3/6] ALSA: snd-usb: switch over to new endpoint streaming logic Daniel Mack
2012-04-12 11:51 ` [PATCH 4/6] ALSA: snd-usb: remove old " Daniel Mack
2012-04-12 11:51 ` [PATCH 5/6] ALSA: snd-usb: add support for implicit feedback Daniel Mack
2012-04-12 11:51 ` [PATCH 6/6] ALSA: snd-usb: add some documentation Daniel Mack
2012-04-12 23:59 ` [PATCH 0/6] snd-usb endpoint rework, version 7 Grant Diffey
2012-04-13 1:39 ` Grant Diffey
2012-04-13 6:19 ` Daniel Mack
2012-04-13 6:23 ` Takashi Iwai
2012-04-16 12:00 ` Grant Diffey
2012-04-13 7:32 ` Felix Homann
2012-04-13 7:51 ` Takashi Iwai
2012-04-13 14:10 ` Felix Homann
2012-04-13 14:15 ` Takashi Iwai
2012-04-13 14:25 ` Felix Homann
2012-04-13 14:49 ` Felix Homann
2012-04-13 6:25 ` Takashi Iwai
2012-04-13 19:25 ` Takashi Iwai
2012-04-13 19:27 ` [PATCH 1/3] ALSA: usb: Remove unused variable Takashi Iwai
2012-04-13 19:28 ` [PATCH 2/3] ALSA: usb: Fix fill_max flag set Takashi Iwai
2012-04-13 19:28 ` [PATCH 3/3] ALSA: usb: Remove obsoleted fields from struct snd_usb_substream Takashi Iwai
2012-04-13 20:19 ` [PATCH 0/6] snd-usb endpoint rework, version 7 Daniel Mack
2012-04-17 13:33 ` Aurélien Leblond
-- strict thread matches above, loose matches on Subject: below --
2011-12-23 16:15 [PATCH 0/6] snd-usb endpoint rework, version 6 Daniel Mack
2011-12-23 16:15 ` [PATCH 1/6] ALSA: snd-usb: add snd_usb_audio-wide mutex Daniel Mack
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=1334231475-20980-2-git-send-email-zonque@gmail.com \
--to=zonque@gmail.com \
--cc=alsa-devel@alsa-project.org \
--cc=blablack@gmail.com \
--cc=clemens@ladisch.de \
--cc=gdiffey@gmail.com \
--cc=linuxaudio@showlabor.de \
--cc=tiwai@suse.de \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).