Skip to contentSkip to conversation

patch needed for powermac driver in 0.9beta12

DISCUSSION Jack Howarth 1 participant 1 message Apr 4, 2002

lore
Share & tools
lore
#0 lore raw

Hello,
The alsa-driver 0.9beta12 release is unable to build
the snd-powermac driver on ppclinux due to 1) a change in the api to the snd_power_lock call that wasn't migrated into pmac.c and 2) missing includes for linux/delay.h in awacs.c and keywest.c which result in unresolved symbols for udelay and mdelay. The following patch resolved these issues and the resulting snd-powermac driver loads and operates fine. Please add these changes to the next release.
Jack Howarth
------------------------------------------------------------

diff -uNr alsa-driver-0.9+0beta12-1/alsa-kernel/ppc/awacs.c alsa-driver-0.9+0beta12-1.new/alsa-kernel/ppc/awacs.c
--- alsa-driver-0.9+0beta12-1/alsa-kernel/ppc/awacs.c Thu Feb 14 12:40:34 2002+++ alsa-driver-0.9+0beta12-1.new/alsa-kernel/ppc/awacs.c Wed Apr 3 20:27:47 2002
@@ -24,6 +24,7 @@
#include <sound/driver.h>
#include <asm/io.h>
#include <linux/init.h>
+#include <linux/delay.h>
#include <sound/core.h>
#include "pmac.h"

diff -uNr alsa-driver-0.9+0beta12-1/alsa-kernel/ppc/keywest.c alsa-driver-0.9+0beta12-1.new/alsa-kernel/ppc/keywest.c
--- alsa-driver-0.9+0beta12-1/alsa-kernel/ppc/keywest.c Mon Feb 25 06:50:13 2002+++ alsa-driver-0.9+0beta12-1.new/alsa-kernel/ppc/keywest.c Wed Apr 3 20:27:04 2002
@@ -26,6 +26,7 @@
#define __NO_VERSION__
#include <sound/driver.h>
#include <linux/init.h>
+#include <linux/delay.h>
#include <sound/core.h>
#include "pmac.h"

diff -uNr alsa-driver-0.9+0beta12-1/alsa-kernel/ppc/pmac.c alsa-driver-0.9+0beta12-1.new/alsa-kernel/ppc/pmac.c
--- alsa-driver-0.9+0beta12-1/alsa-kernel/ppc/pmac.c Thu Feb 14 12:40:34 2002+++ alsa-driver-0.9+0beta12-1.new/alsa-kernel/ppc/pmac.c Wed Apr 3 20:26:13 2002
@@ -1307,7 +1307,7 @@

        unsigned long flags;
        snd_card_t *card = chip->card;

- snd_power_lock(card, can_schedule);

+       snd_power_lock(card);
        if (card->power_state == SNDRV_CTL_POWER_D3hot)
                goto __skip;

@@ -1331,7 +1331,7 @@

 {
        snd_card_t *card = chip->card;

- snd_power_lock(card, can_schedule);

+       snd_power_lock(card);
        if (card->power_state == SNDRV_CTL_POWER_D0)
                goto __skip;

-----------------------------------------------------------------------