aboutsummaryrefslogtreecommitdiffstats
path: root/sound/isa/cs423x
diff options
context:
space:
mode:
authorIngo Molnar <mingo@elte.hu>2006-01-16 10:33:08 -0500
committerJaroslav Kysela <perex@suse.cz>2006-03-22 04:25:03 -0500
commit8b7547f95cbe8a5940df62ed730646fdfcba5fda (patch)
tree704102a2b9eaef96cf8b96c46e9e48855de64ea3 /sound/isa/cs423x
parentef9f0a42db987e7e2df72289fb4522d24027786b (diff)
[ALSA] semaphore -> mutex (ISA part)
Semaphore to mutex conversion. The conversion was generated via scripts, and the result was validated automatically via a script as well. Signed-off-by: Ingo Molnar <mingo@elte.hu> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Takashi Iwai <tiwai@suse.de>
Diffstat (limited to 'sound/isa/cs423x')
-rw-r--r--sound/isa/cs423x/cs4231_lib.c30
-rw-r--r--sound/isa/cs423x/cs4236_lib.c4
2 files changed, 17 insertions, 17 deletions
diff --git a/sound/isa/cs423x/cs4231_lib.c b/sound/isa/cs423x/cs4231_lib.c
index eab7eb59b5f7..823db8246701 100644
--- a/sound/isa/cs423x/cs4231_lib.c
+++ b/sound/isa/cs423x/cs4231_lib.c
@@ -531,7 +531,7 @@ static void snd_cs4231_playback_format(struct snd_cs4231 *chip,
531 unsigned long flags; 531 unsigned long flags;
532 int full_calib = 1; 532 int full_calib = 1;
533 533
534 down(&chip->mce_mutex); 534 mutex_lock(&chip->mce_mutex);
535 snd_cs4231_calibrate_mute(chip, 1); 535 snd_cs4231_calibrate_mute(chip, 1);
536 if (chip->hardware == CS4231_HW_CS4231A || 536 if (chip->hardware == CS4231_HW_CS4231A ||
537 (chip->hardware & CS4231_HW_CS4232_MASK)) { 537 (chip->hardware & CS4231_HW_CS4232_MASK)) {
@@ -560,7 +560,7 @@ static void snd_cs4231_playback_format(struct snd_cs4231 *chip,
560 snd_cs4231_mce_down(chip); 560 snd_cs4231_mce_down(chip);
561 } 561 }
562 snd_cs4231_calibrate_mute(chip, 0); 562 snd_cs4231_calibrate_mute(chip, 0);
563 up(&chip->mce_mutex); 563 mutex_unlock(&chip->mce_mutex);
564} 564}
565 565
566static void snd_cs4231_capture_format(struct snd_cs4231 *chip, 566static void snd_cs4231_capture_format(struct snd_cs4231 *chip,
@@ -570,7 +570,7 @@ static void snd_cs4231_capture_format(struct snd_cs4231 *chip,
570 unsigned long flags; 570 unsigned long flags;
571 int full_calib = 1; 571 int full_calib = 1;
572 572
573 down(&chip->mce_mutex); 573 mutex_lock(&chip->mce_mutex);
574 snd_cs4231_calibrate_mute(chip, 1); 574 snd_cs4231_calibrate_mute(chip, 1);
575 if (chip->hardware == CS4231_HW_CS4231A || 575 if (chip->hardware == CS4231_HW_CS4231A ||
576 (chip->hardware & CS4231_HW_CS4232_MASK)) { 576 (chip->hardware & CS4231_HW_CS4232_MASK)) {
@@ -603,7 +603,7 @@ static void snd_cs4231_capture_format(struct snd_cs4231 *chip,
603 snd_cs4231_mce_down(chip); 603 snd_cs4231_mce_down(chip);
604 } 604 }
605 snd_cs4231_calibrate_mute(chip, 0); 605 snd_cs4231_calibrate_mute(chip, 0);
606 up(&chip->mce_mutex); 606 mutex_unlock(&chip->mce_mutex);
607} 607}
608 608
609/* 609/*
@@ -709,15 +709,15 @@ static int snd_cs4231_open(struct snd_cs4231 *chip, unsigned int mode)
709{ 709{
710 unsigned long flags; 710 unsigned long flags;
711 711
712 down(&chip->open_mutex); 712 mutex_lock(&chip->open_mutex);
713 if ((chip->mode & mode) || 713 if ((chip->mode & mode) ||
714 ((chip->mode & CS4231_MODE_OPEN) && chip->single_dma)) { 714 ((chip->mode & CS4231_MODE_OPEN) && chip->single_dma)) {
715 up(&chip->open_mutex); 715 mutex_unlock(&chip->open_mutex);
716 return -EAGAIN; 716 return -EAGAIN;
717 } 717 }
718 if (chip->mode & CS4231_MODE_OPEN) { 718 if (chip->mode & CS4231_MODE_OPEN) {
719 chip->mode |= mode; 719 chip->mode |= mode;
720 up(&chip->open_mutex); 720 mutex_unlock(&chip->open_mutex);
721 return 0; 721 return 0;
722 } 722 }
723 /* ok. now enable and ack CODEC IRQ */ 723 /* ok. now enable and ack CODEC IRQ */
@@ -737,7 +737,7 @@ static int snd_cs4231_open(struct snd_cs4231 *chip, unsigned int mode)
737 spin_unlock_irqrestore(&chip->reg_lock, flags); 737 spin_unlock_irqrestore(&chip->reg_lock, flags);
738 738
739 chip->mode = mode; 739 chip->mode = mode;
740 up(&chip->open_mutex); 740 mutex_unlock(&chip->open_mutex);
741 return 0; 741 return 0;
742} 742}
743 743
@@ -745,10 +745,10 @@ static void snd_cs4231_close(struct snd_cs4231 *chip, unsigned int mode)
745{ 745{
746 unsigned long flags; 746 unsigned long flags;
747 747
748 down(&chip->open_mutex); 748 mutex_lock(&chip->open_mutex);
749 chip->mode &= ~mode; 749 chip->mode &= ~mode;
750 if (chip->mode & CS4231_MODE_OPEN) { 750 if (chip->mode & CS4231_MODE_OPEN) {
751 up(&chip->open_mutex); 751 mutex_unlock(&chip->open_mutex);
752 return; 752 return;
753 } 753 }
754 snd_cs4231_calibrate_mute(chip, 1); 754 snd_cs4231_calibrate_mute(chip, 1);
@@ -785,7 +785,7 @@ static void snd_cs4231_close(struct snd_cs4231 *chip, unsigned int mode)
785 snd_cs4231_calibrate_mute(chip, 0); 785 snd_cs4231_calibrate_mute(chip, 0);
786 786
787 chip->mode = 0; 787 chip->mode = 0;
788 up(&chip->open_mutex); 788 mutex_unlock(&chip->open_mutex);
789} 789}
790 790
791/* 791/*
@@ -1408,8 +1408,8 @@ static int snd_cs4231_new(struct snd_card *card,
1408 chip->hwshare = hwshare; 1408 chip->hwshare = hwshare;
1409 1409
1410 spin_lock_init(&chip->reg_lock); 1410 spin_lock_init(&chip->reg_lock);
1411 init_MUTEX(&chip->mce_mutex); 1411 mutex_init(&chip->mce_mutex);
1412 init_MUTEX(&chip->open_mutex); 1412 mutex_init(&chip->open_mutex);
1413 chip->card = card; 1413 chip->card = card;
1414 chip->rate_constraint = snd_cs4231_xrate; 1414 chip->rate_constraint = snd_cs4231_xrate;
1415 chip->set_playback_format = snd_cs4231_playback_format; 1415 chip->set_playback_format = snd_cs4231_playback_format;
@@ -1538,8 +1538,8 @@ int snd_cs4231_pcm(struct snd_cs4231 *chip, int device, struct snd_pcm **rpcm)
1538 return err; 1538 return err;
1539 1539
1540 spin_lock_init(&chip->reg_lock); 1540 spin_lock_init(&chip->reg_lock);
1541 init_MUTEX(&chip->mce_mutex); 1541 mutex_init(&chip->mce_mutex);
1542 init_MUTEX(&chip->open_mutex); 1542 mutex_init(&chip->open_mutex);
1543 1543
1544 snd_pcm_set_ops(pcm, SNDRV_PCM_STREAM_PLAYBACK, &snd_cs4231_playback_ops); 1544 snd_pcm_set_ops(pcm, SNDRV_PCM_STREAM_PLAYBACK, &snd_cs4231_playback_ops);
1545 snd_pcm_set_ops(pcm, SNDRV_PCM_STREAM_CAPTURE, &snd_cs4231_capture_ops); 1545 snd_pcm_set_ops(pcm, SNDRV_PCM_STREAM_CAPTURE, &snd_cs4231_capture_ops);
diff --git a/sound/isa/cs423x/cs4236_lib.c b/sound/isa/cs423x/cs4236_lib.c
index e36981d64ec5..1125ddb2b1aa 100644
--- a/sound/isa/cs423x/cs4236_lib.c
+++ b/sound/isa/cs423x/cs4236_lib.c
@@ -841,7 +841,7 @@ static int snd_cs4236_put_iec958_switch(struct snd_kcontrol *kcontrol, struct sn
841 841
842 enable = ucontrol->value.integer.value[0] & 1; 842 enable = ucontrol->value.integer.value[0] & 1;
843 843
844 down(&chip->mce_mutex); 844 mutex_lock(&chip->mce_mutex);
845 snd_cs4231_mce_up(chip); 845 snd_cs4231_mce_up(chip);
846 spin_lock_irqsave(&chip->reg_lock, flags); 846 spin_lock_irqsave(&chip->reg_lock, flags);
847 val = (chip->image[CS4231_ALT_FEATURE_1] & ~0x0e) | (0<<2) | (enable << 1); 847 val = (chip->image[CS4231_ALT_FEATURE_1] & ~0x0e) | (0<<2) | (enable << 1);
@@ -854,7 +854,7 @@ static int snd_cs4236_put_iec958_switch(struct snd_kcontrol *kcontrol, struct sn
854 snd_cs4236_ctrl_out(chip, 4, val); 854 snd_cs4236_ctrl_out(chip, 4, val);
855 spin_unlock_irqrestore(&chip->reg_lock, flags); 855 spin_unlock_irqrestore(&chip->reg_lock, flags);
856 snd_cs4231_mce_down(chip); 856 snd_cs4231_mce_down(chip);
857 up(&chip->mce_mutex); 857 mutex_unlock(&chip->mce_mutex);
858 858
859#if 0 859#if 0
860 printk("set valid: ALT = 0x%x, C3 = 0x%x, C4 = 0x%x, C5 = 0x%x, C6 = 0x%x, C8 = 0x%x\n", 860 printk("set valid: ALT = 0x%x, C3 = 0x%x, C4 = 0x%x, C5 = 0x%x, C6 = 0x%x, C8 = 0x%x\n",