From: Takashi Iwai <tiwai@suse.de>
To: Erik Mouw <erik@harddisk-recovery.com>
Cc: linux-kernel@vger.kernel.org
Subject: Re: [BUG 2.6.0-test9] sleep from invalid function (ALSA related?)
Date: Fri, 14 Nov 2003 12:16:37 +0100 [thread overview]
Message-ID: <s5hk763jj3e.wl@alsa2.suse.de> (raw)
In-Reply-To: <20031113113316.GA30460@bitwizard.nl>
[-- Attachment #1: Type: text/plain, Size: 435 bytes --]
At Thu, 13 Nov 2003 12:33:16 +0100,
Erik Mouw wrote:
>
> Hi,
>
> I compiled 2.6.0-test9 on my desktop last night. Not too many problems
> so far, but this debug trace caught my attention:
(snip)
> It looks ALSA related to me, the soundcard I use is a Midiman
> Audiophile 2496, which uses the ice1712 driver.
the attached patch should fix.
please give a try.
--
Takashi Iwai <tiwai@suse.de> ALSA Developer - www.alsa-project.org
[-- Attachment #2: i2c-lock-fix.dif --]
[-- Type: application/octet-stream, Size: 1431 bytes --]
diff -ru linux/include/sound linux/include/sound
--- linux/include/sound/i2c.h 23 Apr 2002 13:20:58 -0000 1.3
+++ linux/include/sound/i2c.h 13 Nov 2003 11:18:12 -0000 1.4
@@ -58,7 +58,7 @@
snd_card_t *card; /* card which I2C belongs to */
char name[32]; /* some useful label */
- spinlock_t lock;
+ struct semaphore lock_mutex;
snd_i2c_bus_t *master; /* master bus when SCK/SCL is shared */
struct list_head buses; /* master: slave buses sharing SCK/SCL, slave: link list */
@@ -84,15 +84,15 @@
static inline void snd_i2c_lock(snd_i2c_bus_t *bus) {
if (bus->master)
- spin_lock(&bus->master->lock);
+ down(&bus->master->lock_mutex);
else
- spin_lock(&bus->lock);
+ down(&bus->lock_mutex);
}
static inline void snd_i2c_unlock(snd_i2c_bus_t *bus) {
if (bus->master)
- spin_unlock(&bus->master->lock);
+ up(&bus->master->lock_mutex);
else
- spin_unlock(&bus->lock);
+ up(&bus->lock_mutex);
}
int snd_i2c_sendbytes(snd_i2c_device_t *device, unsigned char *bytes, int count);
diff -ru linux/sound linux/sound
--- linux/sound/i2c/i2c.c 2 Jun 2003 10:04:44 -0000 1.7
+++ linux/sound/i2c/i2c.c 13 Nov 2003 11:18:25 -0000 1.8
@@ -84,7 +84,7 @@
bus = (snd_i2c_bus_t *)snd_magic_kcalloc(snd_i2c_bus_t, 0, GFP_KERNEL);
if (bus == NULL)
return -ENOMEM;
- spin_lock_init(&bus->lock);
+ init_MUTEX(&bus->lock_mutex);
INIT_LIST_HEAD(&bus->devices);
INIT_LIST_HEAD(&bus->buses);
bus->card = card;
next prev parent reply other threads:[~2003-11-14 11:16 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2003-11-13 11:33 [BUG 2.6.0-test9] sleep from invalid function (ALSA related?) Erik Mouw
2003-11-14 11:16 ` Takashi Iwai [this message]
2003-11-18 23:40 ` Erik Mouw
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=s5hk763jj3e.wl@alsa2.suse.de \
--to=tiwai@suse.de \
--cc=erik@harddisk-recovery.com \
--cc=linux-kernel@vger.kernel.org \
/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