* snd_ac97_resume
@ 2005-01-11 10:24 Lukas Hejtmanek
2005-01-11 16:24 ` [PATCH] [ALSA] Fix Oops at resume Takashi Iwai
0 siblings, 1 reply; 2+ messages in thread
From: Lukas Hejtmanek @ 2005-01-11 10:24 UTC (permalink / raw)
To: tiwai; +Cc: linux-kernel
Hello,
Pavel Machek told me that you have patch solving oops in snd_ac97_resume in the
latest -bk kernel. Could you send it to me?
--
Lukáš Hejtmánek
^ permalink raw reply [flat|nested] 2+ messages in thread
* [PATCH] [ALSA] Fix Oops at resume
2005-01-11 10:24 snd_ac97_resume Lukas Hejtmanek
@ 2005-01-11 16:24 ` Takashi Iwai
0 siblings, 0 replies; 2+ messages in thread
From: Takashi Iwai @ 2005-01-11 16:24 UTC (permalink / raw)
To: Lukas Hejtmanek; +Cc: linux-kernel
At Tue, 11 Jan 2005 11:24:10 +0100,
Lukas Hejtmanek wrote:
>
> Hello,
>
> Pavel Machek told me that you have patch solving oops in snd_ac97_resume in the
> latest -bk kernel. Could you send it to me?
Below is the patch.
Takashi
================================================================
Summary: [ALSA] Fix Oops at resume
Fixed Oops at resume on certain codecs.
Set null ops when no patch exists or the patch doesn't set build_ops.
Signed-off-by: Takashi Iwai <tiwai@suse.de>
--- linux/sound/pci/ac97/ac97_codec.c 4 Jan 2005 11:08:31 -0000 1.159
+++ linux/sound/pci/ac97/ac97_codec.c 10 Jan 2005 15:50:45 -0000
@@ -1505,7 +1505,7 @@
snd_ac97_update_bits(ac97, AC97_GENERAL_PURPOSE, ~AC97_GP_DRSS_MASK, 0x0000);
/* build 3D controls */
- if (ac97->build_ops && ac97->build_ops->build_3d) {
+ if (ac97->build_ops->build_3d) {
ac97->build_ops->build_3d(ac97);
} else {
if (snd_ac97_try_volume_mix(ac97, AC97_3D_CONTROL)) {
@@ -1528,14 +1528,14 @@
/* build S/PDIF controls */
if (ac97->ext_id & AC97_EI_SPDIF) {
- if (ac97->build_ops && ac97->build_ops->build_spdif) {
+ if (ac97->build_ops->build_spdif) {
if ((err = ac97->build_ops->build_spdif(ac97)) < 0)
return err;
} else {
for (idx = 0; idx < 5; idx++)
if ((err = snd_ctl_add(card, snd_ac97_cnew(&snd_ac97_controls_spdif[idx], ac97))) < 0)
return err;
- if (ac97->build_ops && ac97->build_ops->build_post_spdif) {
+ if (ac97->build_ops->build_post_spdif) {
if ((err = ac97->build_ops->build_post_spdif(ac97)) < 0)
return err;
}
@@ -1548,7 +1548,7 @@
}
/* build chip specific controls */
- if (ac97->build_ops && ac97->build_ops->build_specific)
+ if (ac97->build_ops->build_specific)
if ((err = ac97->build_ops->build_specific(ac97)) < 0)
return err;
@@ -1811,6 +1811,9 @@
return 0;
}
+/* build_ops to do nothing */
+static struct snd_ac97_build_ops null_build_ops;
+
/**
* snd_ac97_mixer - create an Codec97 component
* @bus: the AC97 bus which codec is attached to
@@ -2050,6 +2053,9 @@
bus->ops->init(ac97);
snd_ac97_get_name(ac97, ac97->id, name, !ac97_is_audio(ac97));
snd_ac97_get_name(NULL, ac97->id, name, !ac97_is_audio(ac97)); // ac97->id might be changed in the special setup code
+ if (! ac97->build_ops)
+ ac97->build_ops = &null_build_ops;
+
if (ac97_is_audio(ac97)) {
char comp[16];
if (card->mixername[0] == '\0') {
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2005-01-11 16:24 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2005-01-11 10:24 snd_ac97_resume Lukas Hejtmanek
2005-01-11 16:24 ` [PATCH] [ALSA] Fix Oops at resume Takashi Iwai
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.