[alsa-devel] [RFC] ymfpci - re-enable legacy audio after suspend resume
Raymond Yau
superquad.vortex2 at gmail.com
Sun Mar 11 00:37:30 CET 2012
2012/3/9 Takashi Iwai <tiwai at suse.de>:
> At Fri, 9 Mar 2012 07:28:26 +0800,
> Raymond Yau wrote:
>>
>> 2012/3/8, Takashi Iwai <tiwai at suse.de>:
>> > At Thu, 8 Mar 2012 12:12:33 +0800,
>> > Raymond Yau wrote:
>> >>
>> >> Since the Legacy Audio Control register is reset to default after
>> >> suspend resume cycle
>> >>
>> >> need to enable the Legacy Audio Control Bit in order to use OPL3 FM Synth
>> >>
>> >> however it is still need to use sbiload instrument loader to reload
>> >> the instruments
>> >
>> > Isn't it better to save and restore these PCI registers like below?
>> > It still doesn't solve the lost instrument problem, though.
>> >
>>
>> I only use std.o3 and drums.o3
>>
>> It seem that the playback of midi using aplaymidi can resume playback
>> after suspend with my ymf724f
>>
>> so it seem that there is no need to reload the instrument with your patch
>>
>> >
>> > ---
>> > diff --git a/include/sound/ymfpci.h b/include/sound/ymfpci.h
>> > index 444cd6b..1e35b16 100644
>> > --- a/include/sound/ymfpci.h
>> > +++ b/include/sound/ymfpci.h
>> > @@ -366,6 +366,8 @@ struct snd_ymfpci {
>> > #ifdef CONFIG_PM
>> > u32 *saved_regs;
>> > u32 saved_ydsxgr_mode;
>> > + u16 saved_saved_dsxg_legacy;
>> > + u16 saved_saved_dsxg_elegacy;
>>
>>
>> Should be saved_dsxg_legacy and save_dsxg_elegacy.
>
> Err, of course.
>
>> How can this change back port to 2.6 kernel ?
>
> I guess the patch can be applied as is. There have been no big changes
> in that driver since ages.
>
>
This patch may be useless when oss is disabled in kernel 3.x
aplaymidi -l
open /dev/snd/seq failed: No such file or directory
it only happen with snd-ymfpci when there oss is disabled
I can still use wavetable synth of snd-emu10k1 after I replaced
ymf724f with ct4760p
More information about the Alsa-devel
mailing list