]> err.no Git - linux-2.6/commitdiff
[ALSA] Fix-up sleeping in sound/ppc
authorNishanth Aravamudan <nacc@us.ibm.com>
Sat, 9 Jul 2005 08:53:24 +0000 (10:53 +0200)
committerJaroslav Kysela <perex@suse.cz>
Thu, 28 Jul 2005 10:22:15 +0000 (12:22 +0200)
PPC AWACS driver,PPC PMAC driver,PPC Tumbler driver
Description: Fix-up sleeping in sound/ppc. Replace big_mdelay() with
msleep() to guarantee the task delays as expected. This also involved
replacing/removing custom sleep functions.

Signed-off-by: Nishanth Aravamudan <nacc@us.ibm.com>
Signed-off-by: Jaroslav Kysela <perex@suse.cz>
sound/ppc/awacs.c
sound/ppc/pmac.h
sound/ppc/tumbler.c

index 061e52d3d771b4e39226a07de44bf58d4b606825..758ca1bcbcf2657ec506bde5a71feed5117cdfc2 100644 (file)
@@ -103,7 +103,7 @@ static void screamer_recalibrate(pmac_t *chip)
        snd_pmac_awacs_write_noreg(chip, 1, chip->awacs_reg[1]);
        if (chip->manufacturer == 0x1)
                /* delay for broken crystal part */
-               big_mdelay(750);
+               msleep(750);
        snd_pmac_awacs_write_noreg(chip, 1,
                                   chip->awacs_reg[1] | MASK_RECALIBRATE | MASK_CMUTE | MASK_AMUTE);
        snd_pmac_awacs_write_noreg(chip, 1, chip->awacs_reg[1]);
@@ -653,10 +653,10 @@ static void snd_pmac_awacs_resume(pmac_t *chip)
 {
        if (machine_is_compatible("PowerBook3,1")
            || machine_is_compatible("PowerBook3,2")) {
-               big_mdelay(100);
+               msleep(100);
                snd_pmac_awacs_write_reg(chip, 1,
                        chip->awacs_reg[1] & ~MASK_PAROUT);
-               big_mdelay(300);
+               msleep(300);
        }
 
        awacs_restore_all_regs(chip);
index 582db522011978849a8f0f2deb09a6e8a30d7d31..ae3bb6c6edfffb0827c4e47e0a2cb4997e1cabb9 100644 (file)
@@ -212,9 +212,4 @@ int snd_pmac_boolean_mono_info(snd_kcontrol_t *kcontrol, snd_ctl_elem_info_t *ui
 
 int snd_pmac_add_automute(pmac_t *chip);
 
-#define big_mdelay(msec) do {\
-       set_current_state(TASK_UNINTERRUPTIBLE);\
-       schedule_timeout(((msec) * HZ + 999) / 1000);\
-} while (0)
-
 #endif /* __PMAC_H */
index 36c5d5d45bb1302bf0765f73ff2c41a8358a6005..b94437c024b1dfce38f39279b3876f935589c838 100644 (file)
@@ -945,7 +945,7 @@ static void device_change_handler(void *self)
                        check_mute(chip, &mix->line_mute, 0, mix->auto_mute_notify,
                                   chip->lineout_sw_ctl);
                if (mix->anded_reset)
-                       big_mdelay(10);
+                       msleep(10);
                check_mute(chip, &mix->amp_mute, 1, mix->auto_mute_notify,
                           chip->speaker_sw_ctl);
                mix->drc_enable = 0;
@@ -954,7 +954,7 @@ static void device_change_handler(void *self)
                check_mute(chip, &mix->amp_mute, 0, mix->auto_mute_notify,
                           chip->speaker_sw_ctl);
                if (mix->anded_reset)
-                       big_mdelay(10);
+                       msleep(10);
                check_mute(chip, &mix->hp_mute, 1, mix->auto_mute_notify,
                           chip->master_sw_ctl);
                if (mix->line_mute.addr != 0)
@@ -1109,22 +1109,22 @@ static void tumbler_reset_audio(pmac_t *chip)
                DBG("(I) codec anded reset !\n");
                write_audio_gpio(&mix->hp_mute, 0);
                write_audio_gpio(&mix->amp_mute, 0);
-               big_mdelay(200);
+               msleep(200);
                write_audio_gpio(&mix->hp_mute, 1);
                write_audio_gpio(&mix->amp_mute, 1);
-               big_mdelay(100);
+               msleep(100);
                write_audio_gpio(&mix->hp_mute, 0);
                write_audio_gpio(&mix->amp_mute, 0);
-               big_mdelay(100);
+               msleep(100);
        } else {
                DBG("(I) codec normal reset !\n");
 
                write_audio_gpio(&mix->audio_reset, 0);
-               big_mdelay(200);
+               msleep(200);
                write_audio_gpio(&mix->audio_reset, 1);
-               big_mdelay(100);
+               msleep(100);
                write_audio_gpio(&mix->audio_reset, 0);
-               big_mdelay(100);
+               msleep(100);
        }
 }