* [PATCH] Powermac ALSA sound driver updates
@ 2003-05-13 5:25 Paul Mackerras
2003-05-13 8:03 ` Takashi Iwai
0 siblings, 1 reply; 2+ messages in thread
From: Paul Mackerras @ 2003-05-13 5:25 UTC (permalink / raw)
To: tiwai; +Cc: linux-kernel
This patch fixes the sound/ppc/awacs.c driver so that the sound works
on my G4 powerbook (titanium) after waking it up from sleep, and also
fixes sound/ppc/keywest.c to adapt it to changes in the i2c layer.
Takashi, please pass this on to Linus if it looks OK to you.
Thanks,
Paul.
diff -urN linux-2.5/sound/ppc/awacs.c pmac-2.5/sound/ppc/awacs.c
--- linux-2.5/sound/ppc/awacs.c 2003-04-14 09:28:43.000000000 +1000
+++ pmac-2.5/sound/ppc/awacs.c 2003-04-15 22:43:33.000000000 +1000
@@ -649,8 +649,22 @@
}
#ifdef CONFIG_PMAC_PBOOK
+static void snd_pmac_awacs_suspend(pmac_t *chip)
+{
+ snd_pmac_awacs_write_noreg(chip, 1, (chip->awacs_reg[1]
+ | MASK_AMUTE | MASK_CMUTE));
+}
+
static void snd_pmac_awacs_resume(pmac_t *chip)
{
+ if (machine_is_compatible("PowerBook3,1")
+ || machine_is_compatible("PowerBook3,2")) {
+ do_mdelay(100, 0);
+ snd_pmac_awacs_write_reg(chip, 1,
+ chip->awacs_reg[1] & ~MASK_PAROUT);
+ do_mdelay(300, 0);
+ }
+
awacs_restore_all_regs(chip, 0);
if (chip->model == PMAC_SCREAMER) {
/* reset power bits in reg 6 */
@@ -868,6 +882,7 @@
*/
chip->set_format = snd_pmac_awacs_set_format;
#ifdef CONFIG_PMAC_PBOOK
+ chip->suspend = snd_pmac_awacs_suspend;
chip->resume = snd_pmac_awacs_resume;
#endif
#ifdef PMAC_SUPPORT_AUTOMUTE
diff -urN linux-2.5/sound/ppc/keywest.c pmac-2.5/sound/ppc/keywest.c
--- linux-2.5/sound/ppc/keywest.c 2003-02-04 19:36:43.000000000 +1100
+++ pmac-2.5/sound/ppc/keywest.c 2003-04-06 12:14:38.000000000 +1000
@@ -57,20 +57,21 @@
if (! keywest_ctx)
return -EINVAL;
- if (strncmp(adapter->name, "mac-io", 6))
+ if (strncmp(adapter->dev.name, "mac-io", 6))
return 0; /* ignored */
new_client = kmalloc(sizeof(struct i2c_client), GFP_KERNEL);
if (! new_client)
return -ENOMEM;
+ memset(new_client, 0, sizeof(struct i2c_client));
new_client->addr = keywest_ctx->addr;
- new_client->data = keywest_ctx;
+ i2c_set_clientdata(new_client, keywest_ctx);
new_client->adapter = adapter;
new_client->driver = &keywest_driver;
new_client->flags = 0;
- strcpy(new_client->name, keywest_ctx->name);
+ strcpy(new_client->dev.name, keywest_ctx->name);
new_client->id = keywest_ctx->id++; /* Automatically unique */
keywest_ctx->client = new_client;
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: [PATCH] Powermac ALSA sound driver updates
2003-05-13 5:25 [PATCH] Powermac ALSA sound driver updates Paul Mackerras
@ 2003-05-13 8:03 ` Takashi Iwai
0 siblings, 0 replies; 2+ messages in thread
From: Takashi Iwai @ 2003-05-13 8:03 UTC (permalink / raw)
To: Paul Mackerras; +Cc: linux-kernel
At Tue, 13 May 2003 15:25:04 +1000,
Paul Mackerras wrote:
>
> This patch fixes the sound/ppc/awacs.c driver so that the sound works
> on my G4 powerbook (titanium) after waking it up from sleep, and also
> fixes sound/ppc/keywest.c to adapt it to changes in the i2c layer.
thanks, the changes will be included in the next ALSA update.
Takashi
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2003-05-13 7:51 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2003-05-13 5:25 [PATCH] Powermac ALSA sound driver updates Paul Mackerras
2003-05-13 8:03 ` Takashi Iwai
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).