On Mon, Jun 07, 2004 at 03:40:23PM +0200, Takashi Iwai wrote: > At Mon, 7 Jun 2004 14:08:17 +0100, > Russell King wrote: > > > > On Mon, Jun 07, 2004 at 02:45:20PM +0200, Takashi Iwai wrote: > > > i guess so, too. as you can see in the original post, the error > > > returned from hw_params callback (sample not available), thus it > > > doesn't call trigger(START) callback yet at all. > > > > If we never got past hw_params() then we didn't enable the IO, > > and it must be that something else in the system fiddled with > > the chip and set it incorrectly. > > > > > unfurtunately i can't tell any more unless i read the driver code. > > > where can i find the code? > > > > I never officially released the driver, though it was part of the > > old -rmk patches back in the 2.6.0-test era. Where Roc has got > > the source from, and what modifications have been made is anyones > > guess. > > Roc sent me the code now :) > > after a quick look, it seems that txcr isn't initialized in the open > callback but only in hw_params callback (which was never called in > this case).
Why should it be explicitly initialised? Take a moment to consider what guarantees snd_card_new() gives for the allocated memory. Yep, that's right - it's initialised to zero. So, chan->txcr is already initialised to zero. So, let's step back and consider. At init time. chan->txcr is zeroed. open no change. hw_parms chan->txcr may be set to the required format if successful, but isn't. close chan->txcr should still be zero. Even if hw_params did succeed, then chan->txcr will be set to something which doesn't have TXCR_TXEN set, until the trigger is called with SNDRV_PCM_TRIGGER_START. So I still assert that the problem is in ALSA core or in modifications to the code. > if my guess is correct, adding the following to > aacpi_playback_open() should fix this problem: > > chan->txcr = 0; So respectfully I think the above is crap. But unfortunately I don't have the driver code myself to be able to comment, so its probably been fscked. -- Russell King Linux kernel 2.6 ARM Linux - http://www.arm.linux.org.uk/ maintainer of: 2.6 PCMCIA - http://pcmcia.arm.linux.org.uk/ 2.6 Serial core ------------------------------------------------------- This SF.Net email is sponsored by the new InstallShield X. >From Windows to Linux, servers to mobile, InstallShield X is the one installation-authoring solution that does it all. Learn more and evaluate today! http://www.installshield.com/Dev2Dev/0504 _______________________________________________ Alsa-devel mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/alsa-devel