summaryrefslogtreecommitdiff
path: root/sound/ppc
diff options
context:
space:
mode:
Diffstat (limited to 'sound/ppc')
-rw-r--r--sound/ppc/awacs.c14
-rw-r--r--sound/ppc/burgundy.c4
-rw-r--r--sound/ppc/daca.c6
-rw-r--r--sound/ppc/pmac.c19
-rw-r--r--sound/ppc/pmac.h7
-rw-r--r--sound/ppc/tumbler.c20
6 files changed, 33 insertions, 37 deletions
diff --git a/sound/ppc/awacs.c b/sound/ppc/awacs.c
index e052bd071e5b..758ca1bcbcf2 100644
--- a/sound/ppc/awacs.c
+++ b/sound/ppc/awacs.c
@@ -90,7 +90,7 @@ snd_pmac_awacs_write_noreg(pmac_t *chip, int reg, int val)
snd_pmac_awacs_write(chip, val | (reg << 12));
}
-#ifdef CONFIG_PMAC_PBOOK
+#ifdef CONFIG_PM
/* Recalibrate chip */
static void screamer_recalibrate(pmac_t *chip)
{
@@ -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]);
@@ -642,7 +642,7 @@ static void awacs_restore_all_regs(pmac_t *chip)
}
}
-#ifdef CONFIG_PMAC_PBOOK
+#ifdef CONFIG_PM
static void snd_pmac_awacs_suspend(pmac_t *chip)
{
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);
@@ -676,7 +676,7 @@ static void snd_pmac_awacs_resume(pmac_t *chip)
}
#endif
}
-#endif /* CONFIG_PMAC_PBOOK */
+#endif /* CONFIG_PM */
#ifdef PMAC_SUPPORT_AUTOMUTE
/*
@@ -883,7 +883,7 @@ snd_pmac_awacs_init(pmac_t *chip)
* set lowlevel callbacks
*/
chip->set_format = snd_pmac_awacs_set_format;
-#ifdef CONFIG_PMAC_PBOOK
+#ifdef CONFIG_PM
chip->suspend = snd_pmac_awacs_suspend;
chip->resume = snd_pmac_awacs_resume;
#endif
diff --git a/sound/ppc/burgundy.c b/sound/ppc/burgundy.c
index 3f837d9f3eb1..edbc0484e22a 100644
--- a/sound/ppc/burgundy.c
+++ b/sound/ppc/burgundy.c
@@ -30,7 +30,7 @@
/* Waits for busy flag to clear */
-inline static void
+static inline void
snd_pmac_burgundy_busy_wait(pmac_t *chip)
{
int timeout = 50;
@@ -40,7 +40,7 @@ snd_pmac_burgundy_busy_wait(pmac_t *chip)
printk(KERN_DEBUG "burgundy_busy_wait: timeout\n");
}
-inline static void
+static inline void
snd_pmac_burgundy_extend_wait(pmac_t *chip)
{
int timeout;
diff --git a/sound/ppc/daca.c b/sound/ppc/daca.c
index f24a91693616..a737f298e77d 100644
--- a/sound/ppc/daca.c
+++ b/sound/ppc/daca.c
@@ -218,7 +218,7 @@ static snd_kcontrol_new_t daca_mixers[] = {
};
-#ifdef CONFIG_PMAC_PBOOK
+#ifdef CONFIG_PM
static void daca_resume(pmac_t *chip)
{
pmac_daca_t *mix = chip->mixer_data;
@@ -227,7 +227,7 @@ static void daca_resume(pmac_t *chip)
mix->amp_on ? 0x05 : 0x04);
daca_set_volume(mix);
}
-#endif /* CONFIG_PMAC_PBOOK */
+#endif /* CONFIG_PM */
static void daca_cleanup(pmac_t *chip)
@@ -275,7 +275,7 @@ int __init snd_pmac_daca_init(pmac_t *chip)
return err;
}
-#ifdef CONFIG_PMAC_PBOOK
+#ifdef CONFIG_PM
chip->resume = daca_resume;
#endif
diff --git a/sound/ppc/pmac.c b/sound/ppc/pmac.c
index 080ef3928465..844d76152ea2 100644
--- a/sound/ppc/pmac.c
+++ b/sound/ppc/pmac.c
@@ -36,7 +36,7 @@
#include <asm/pci-bridge.h>
-#if defined(CONFIG_PM) && defined(CONFIG_PMAC_PBOOK)
+#ifdef CONFIG_PM
static int snd_pmac_register_sleep_notifier(pmac_t *chip);
static int snd_pmac_unregister_sleep_notifier(pmac_t *chip);
static int snd_pmac_suspend(snd_card_t *card, pm_message_t state);
@@ -153,7 +153,7 @@ static pmac_stream_t *snd_pmac_get_stream(pmac_t *chip, int stream)
/*
* wait while run status is on
*/
-inline static void
+static inline void
snd_pmac_wait_ack(pmac_stream_t *rec)
{
int timeout = 50000;
@@ -177,7 +177,7 @@ static void snd_pmac_pcm_set_format(pmac_t *chip)
/*
* stop the DMA transfer
*/
-inline static void snd_pmac_dma_stop(pmac_stream_t *rec)
+static inline void snd_pmac_dma_stop(pmac_stream_t *rec)
{
out_le32(&rec->dma->control, (RUN|WAKE|FLUSH|PAUSE) << 16);
snd_pmac_wait_ack(rec);
@@ -186,7 +186,7 @@ inline static void snd_pmac_dma_stop(pmac_stream_t *rec)
/*
* set the command pointer address
*/
-inline static void snd_pmac_dma_set_command(pmac_stream_t *rec, pmac_dbdma_t *cmd)
+static inline void snd_pmac_dma_set_command(pmac_stream_t *rec, pmac_dbdma_t *cmd)
{
out_le32(&rec->dma->cmdptr, cmd->addr);
}
@@ -194,7 +194,7 @@ inline static void snd_pmac_dma_set_command(pmac_stream_t *rec, pmac_dbdma_t *cm
/*
* start the DMA
*/
-inline static void snd_pmac_dma_run(pmac_stream_t *rec, int status)
+static inline void snd_pmac_dma_run(pmac_stream_t *rec, int status)
{
out_le32(&rec->dma->control, status | (status << 16));
}
@@ -782,7 +782,7 @@ static int snd_pmac_free(pmac_t *chip)
}
snd_pmac_sound_feature(chip, 0);
-#if defined(CONFIG_PM) && defined(CONFIG_PMAC_PBOOK)
+#ifdef CONFIG_PM
snd_pmac_unregister_sleep_notifier(chip);
#endif
@@ -1292,7 +1292,7 @@ int __init snd_pmac_new(snd_card_t *card, pmac_t **chip_return)
/* Reset dbdma channels */
snd_pmac_dbdma_reset(chip);
-#if defined(CONFIG_PM) && defined(CONFIG_PMAC_PBOOK)
+#ifdef CONFIG_PM
/* add sleep notifier */
if (! snd_pmac_register_sleep_notifier(chip))
snd_card_set_pm_callback(chip->card, snd_pmac_suspend, snd_pmac_resume, chip);
@@ -1316,7 +1316,7 @@ int __init snd_pmac_new(snd_card_t *card, pmac_t **chip_return)
* sleep notify for powerbook
*/
-#if defined(CONFIG_PM) && defined(CONFIG_PMAC_PBOOK)
+#ifdef CONFIG_PM
/*
* Save state when going to sleep, restore it afterwards.
@@ -1414,4 +1414,5 @@ static int snd_pmac_unregister_sleep_notifier(pmac_t *chip)
return 0;
}
-#endif /* CONFIG_PM && CONFIG_PMAC_PBOOK */
+#endif /* CONFIG_PM */
+
diff --git a/sound/ppc/pmac.h b/sound/ppc/pmac.h
index 0a84c05f714b..ae3bb6c6edff 100644
--- a/sound/ppc/pmac.h
+++ b/sound/ppc/pmac.h
@@ -167,7 +167,7 @@ struct snd_pmac {
void (*set_format)(pmac_t *chip);
void (*update_automute)(pmac_t *chip, int do_notify);
int (*detect_headphone)(pmac_t *chip);
-#ifdef CONFIG_PMAC_PBOOK
+#ifdef CONFIG_PM
void (*suspend)(pmac_t *chip);
void (*resume)(pmac_t *chip);
#endif
@@ -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 */
diff --git a/sound/ppc/tumbler.c b/sound/ppc/tumbler.c
index 9332237cb6a4..b94437c024b1 100644
--- a/sound/ppc/tumbler.c
+++ b/sound/ppc/tumbler.c
@@ -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,26 +1109,26 @@ 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);
}
}
-#ifdef CONFIG_PMAC_PBOOK
+#ifdef CONFIG_PM
/* suspend mixer */
static void tumbler_suspend(pmac_t *chip)
{
@@ -1370,7 +1370,7 @@ int __init snd_pmac_tumbler_init(pmac_t *chip)
if ((err = snd_ctl_add(chip->card, chip->drc_sw_ctl)) < 0)
return err;
-#ifdef CONFIG_PMAC_PBOOK
+#ifdef CONFIG_PM
chip->suspend = tumbler_suspend;
chip->resume = tumbler_resume;
#endif