Powermac ALSA sound driver updates
PATCH 1/1 Powermac ALSA sound driver updates
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.
sound/ppc/awacs.c +15 -0
@@ -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
sound/ppc/keywest.c +4 -3
@@ -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;
At Tue, 13 May 2003 15:25:04 +1000,
Quoted 4 lines · Paul Mackerras
This patch fixes the
sound/ppc/awacs.cdriver so that the sound works on my G4 powerbook (titanium) after waking it up from sleep, and also fixessound/ppc/keywest.cto adapt it to changes in the i2c layer.
thanks, the changes will be included in the next ALSA update.
Takashi