mirror of
https://github.com/edk2-porting/linux-next.git
synced 2024-12-16 09:13:55 +08:00
ALSA: ice1724 - Patch for suspend/resume for ESI Juli@
Add proper suspend/resume code for Juli@ cards. Based on ice1724 suspend/resume work of Igor Chernyshev. Fixes bug https://bugtrack.alsa-project.org/alsa-bug/view.php?id=4413 Tested on linux-2.6.31.6 Signed-off-by: Aleksey Kunitskiy <alexey.kv@gmail.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
This commit is contained in:
parent
401de8184a
commit
50d40f187f
@ -503,6 +503,31 @@ static int __devinit juli_add_controls(struct snd_ice1712 *ice)
|
||||
return 0;
|
||||
}
|
||||
|
||||
/*
|
||||
* suspend/resume
|
||||
* */
|
||||
|
||||
#ifdef CONFIG_PM
|
||||
static int juli_resume(struct snd_ice1712 *ice)
|
||||
{
|
||||
struct snd_akm4xxx *ak = ice->akm;
|
||||
struct juli_spec *spec = ice->spec;
|
||||
/* akm4358 un-reset, un-mute */
|
||||
snd_akm4xxx_reset(ak, 0);
|
||||
/* reinit ak4114 */
|
||||
snd_ak4114_reinit(spec->ak4114);
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int juli_suspend(struct snd_ice1712 *ice)
|
||||
{
|
||||
struct snd_akm4xxx *ak = ice->akm;
|
||||
/* akm4358 reset and soft-mute */
|
||||
snd_akm4xxx_reset(ak, 1);
|
||||
return 0;
|
||||
}
|
||||
#endif
|
||||
|
||||
/*
|
||||
* initialize the chip
|
||||
*/
|
||||
@ -646,6 +671,13 @@ static int __devinit juli_init(struct snd_ice1712 *ice)
|
||||
ice->set_spdif_clock = juli_set_spdif_clock;
|
||||
|
||||
ice->spdif.ops.open = juli_spdif_in_open;
|
||||
|
||||
#ifdef CONFIG_PM
|
||||
ice->pm_resume = juli_resume;
|
||||
ice->pm_suspend = juli_suspend;
|
||||
ice->pm_suspend_enabled = 1;
|
||||
#endif
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user