diff options
Diffstat (limited to 'sound/pci/echoaudio')
-rw-r--r-- | sound/pci/echoaudio/darla20.c | 1 | ||||
-rw-r--r-- | sound/pci/echoaudio/darla24.c | 1 | ||||
-rw-r--r-- | sound/pci/echoaudio/echo3g.c | 1 | ||||
-rw-r--r-- | sound/pci/echoaudio/echoaudio.c | 18 | ||||
-rw-r--r-- | sound/pci/echoaudio/echoaudio.h | 2 | ||||
-rw-r--r-- | sound/pci/echoaudio/gina20.c | 1 | ||||
-rw-r--r-- | sound/pci/echoaudio/gina24.c | 1 | ||||
-rw-r--r-- | sound/pci/echoaudio/indigo.c | 1 | ||||
-rw-r--r-- | sound/pci/echoaudio/indigodj.c | 1 | ||||
-rw-r--r-- | sound/pci/echoaudio/indigoio.c | 1 | ||||
-rw-r--r-- | sound/pci/echoaudio/layla20.c | 1 | ||||
-rw-r--r-- | sound/pci/echoaudio/layla24.c | 1 | ||||
-rw-r--r-- | sound/pci/echoaudio/mia.c | 1 | ||||
-rw-r--r-- | sound/pci/echoaudio/mona.c | 1 |
14 files changed, 10 insertions, 22 deletions
diff --git a/sound/pci/echoaudio/darla20.c b/sound/pci/echoaudio/darla20.c index 87078d3..8c6db3a 100644 --- a/sound/pci/echoaudio/darla20.c +++ b/sound/pci/echoaudio/darla20.c @@ -36,7 +36,6 @@ #define BX_NUM 10 -#include <sound/driver.h> #include <linux/delay.h> #include <linux/init.h> #include <linux/interrupt.h> diff --git a/sound/pci/echoaudio/darla24.c b/sound/pci/echoaudio/darla24.c index 42b48f9..04cbf3e 100644 --- a/sound/pci/echoaudio/darla24.c +++ b/sound/pci/echoaudio/darla24.c @@ -40,7 +40,6 @@ #define BX_NUM 10 -#include <sound/driver.h> #include <linux/delay.h> #include <linux/init.h> #include <linux/interrupt.h> diff --git a/sound/pci/echoaudio/echo3g.c b/sound/pci/echoaudio/echo3g.c index 8dbb7ac..4022e43 100644 --- a/sound/pci/echoaudio/echo3g.c +++ b/sound/pci/echoaudio/echo3g.c @@ -47,7 +47,6 @@ #define BX_NUM chip->bx_num -#include <sound/driver.h> #include <linux/delay.h> #include <linux/init.h> #include <linux/interrupt.h> diff --git a/sound/pci/echoaudio/echoaudio.c b/sound/pci/echoaudio/echoaudio.c index 499ee1a..90ec090 100644 --- a/sound/pci/echoaudio/echoaudio.c +++ b/sound/pci/echoaudio/echoaudio.c @@ -378,7 +378,7 @@ static int pcm_digital_in_open(struct snd_pcm_substream *substream) DE_ACT(("pcm_digital_in_open\n")); max_channels = num_digital_busses_in(chip) - substream->number; - down(&chip->mode_mutex); + mutex_lock(&chip->mode_mutex); if (chip->digital_mode == DIGITAL_MODE_ADAT) err = pcm_open(substream, max_channels); else /* If the card has ADAT, subtract the 6 channels @@ -405,7 +405,7 @@ static int pcm_digital_in_open(struct snd_pcm_substream *substream) chip->can_set_rate=0; din_exit: - up(&chip->mode_mutex); + mutex_unlock(&chip->mode_mutex); return err; } @@ -420,7 +420,7 @@ static int pcm_digital_out_open(struct snd_pcm_substream *substream) DE_ACT(("pcm_digital_out_open\n")); max_channels = num_digital_busses_out(chip) - substream->number; - down(&chip->mode_mutex); + mutex_lock(&chip->mode_mutex); if (chip->digital_mode == DIGITAL_MODE_ADAT) err = pcm_open(substream, max_channels); else /* If the card has ADAT, subtract the 6 channels @@ -447,7 +447,7 @@ static int pcm_digital_out_open(struct snd_pcm_substream *substream) if (atomic_read(&chip->opencount) > 1 && chip->rate_set) chip->can_set_rate=0; dout_exit: - up(&chip->mode_mutex); + mutex_unlock(&chip->mode_mutex); return err; } @@ -1420,7 +1420,7 @@ static int snd_echo_digital_mode_put(struct snd_kcontrol *kcontrol, if (dmode != chip->digital_mode) { /* mode_mutex is required to make this operation atomic wrt pcm_digital_*_open() and set_input_clock() functions. */ - down(&chip->mode_mutex); + mutex_lock(&chip->mode_mutex); /* Do not allow the user to change the digital mode when a pcm device is open because it also changes the number of channels @@ -1439,7 +1439,7 @@ static int snd_echo_digital_mode_put(struct snd_kcontrol *kcontrol, if (changed >= 0) changed = 1; /* No errors */ } - up(&chip->mode_mutex); + mutex_unlock(&chip->mode_mutex); } return changed; } @@ -1566,12 +1566,12 @@ static int snd_echo_clock_source_put(struct snd_kcontrol *kcontrol, return -EINVAL; dclock = chip->clock_source_list[eclock]; if (chip->input_clock != dclock) { - down(&chip->mode_mutex); + mutex_lock(&chip->mode_mutex); spin_lock_irq(&chip->lock); if ((changed = set_input_clock(chip, dclock)) == 0) changed = 1; /* no errors */ spin_unlock_irq(&chip->lock); - up(&chip->mode_mutex); + mutex_unlock(&chip->mode_mutex); } if (changed < 0) @@ -1972,7 +1972,7 @@ static __devinit int snd_echo_create(struct snd_card *card, return err; } atomic_set(&chip->opencount, 0); - init_MUTEX(&chip->mode_mutex); + mutex_init(&chip->mode_mutex); chip->can_set_rate = 1; *rchip = chip; /* Init done ! */ diff --git a/sound/pci/echoaudio/echoaudio.h b/sound/pci/echoaudio/echoaudio.h index 7e88c96..1c88e05 100644 --- a/sound/pci/echoaudio/echoaudio.h +++ b/sound/pci/echoaudio/echoaudio.h @@ -361,7 +361,7 @@ struct echoaudio { spinlock_t lock; struct snd_pcm_substream *substream[DSP_MAXPIPES]; int last_period[DSP_MAXPIPES]; - struct semaphore mode_mutex; + struct mutex mode_mutex; u16 num_digital_modes, digital_mode_list[6]; u16 num_clock_sources, clock_source_list[10]; atomic_t opencount; diff --git a/sound/pci/echoaudio/gina20.c b/sound/pci/echoaudio/gina20.c index fee2d48..c0e64b8 100644 --- a/sound/pci/echoaudio/gina20.c +++ b/sound/pci/echoaudio/gina20.c @@ -40,7 +40,6 @@ #define BX_NUM 14 -#include <sound/driver.h> #include <linux/delay.h> #include <linux/init.h> #include <linux/interrupt.h> diff --git a/sound/pci/echoaudio/gina24.c b/sound/pci/echoaudio/gina24.c index d5eae47..c36a78d 100644 --- a/sound/pci/echoaudio/gina24.c +++ b/sound/pci/echoaudio/gina24.c @@ -46,7 +46,6 @@ #define BX_NUM 26 -#include <sound/driver.h> #include <linux/delay.h> #include <linux/init.h> #include <linux/interrupt.h> diff --git a/sound/pci/echoaudio/indigo.c b/sound/pci/echoaudio/indigo.c index 40f601c..0a58a7c 100644 --- a/sound/pci/echoaudio/indigo.c +++ b/sound/pci/echoaudio/indigo.c @@ -38,7 +38,6 @@ #define BX_NUM 2 -#include <sound/driver.h> #include <linux/delay.h> #include <linux/init.h> #include <linux/interrupt.h> diff --git a/sound/pci/echoaudio/indigodj.c b/sound/pci/echoaudio/indigodj.c index 771c538..2db24d2 100644 --- a/sound/pci/echoaudio/indigodj.c +++ b/sound/pci/echoaudio/indigodj.c @@ -38,7 +38,6 @@ #define BX_NUM 4 -#include <sound/driver.h> #include <linux/delay.h> #include <linux/init.h> #include <linux/interrupt.h> diff --git a/sound/pci/echoaudio/indigoio.c b/sound/pci/echoaudio/indigoio.c index 49c550d..a60c0a0 100644 --- a/sound/pci/echoaudio/indigoio.c +++ b/sound/pci/echoaudio/indigoio.c @@ -39,7 +39,6 @@ #define BX_NUM 4 -#include <sound/driver.h> #include <linux/delay.h> #include <linux/init.h> #include <linux/interrupt.h> diff --git a/sound/pci/echoaudio/layla20.c b/sound/pci/echoaudio/layla20.c index 8f5483a..5061946 100644 --- a/sound/pci/echoaudio/layla20.c +++ b/sound/pci/echoaudio/layla20.c @@ -45,7 +45,6 @@ #define BX_NUM 22 -#include <sound/driver.h> #include <linux/delay.h> #include <linux/init.h> #include <linux/interrupt.h> diff --git a/sound/pci/echoaudio/layla24.c b/sound/pci/echoaudio/layla24.c index 0524667..e09e3ea 100644 --- a/sound/pci/echoaudio/layla24.c +++ b/sound/pci/echoaudio/layla24.c @@ -47,7 +47,6 @@ #define BX_NUM 32 -#include <sound/driver.h> #include <linux/delay.h> #include <linux/init.h> #include <linux/interrupt.h> diff --git a/sound/pci/echoaudio/mia.c b/sound/pci/echoaudio/mia.c index 893c7c2..f3b9b45 100644 --- a/sound/pci/echoaudio/mia.c +++ b/sound/pci/echoaudio/mia.c @@ -45,7 +45,6 @@ #define BX_NUM 8 -#include <sound/driver.h> #include <linux/delay.h> #include <linux/init.h> #include <linux/interrupt.h> diff --git a/sound/pci/echoaudio/mona.c b/sound/pci/echoaudio/mona.c index 3a5d5b0..b05bad9 100644 --- a/sound/pci/echoaudio/mona.c +++ b/sound/pci/echoaudio/mona.c @@ -44,7 +44,6 @@ #define BX_NUM 26 -#include <sound/driver.h> #include <linux/delay.h> #include <linux/init.h> #include <linux/interrupt.h> |