From mboxrd@z Thu Jan 1 00:00:00 1970 From: =?ISO-8859-1?Q?Jo=EBl?= Bourquard Subject: Re: Hi, does someone use i810 onboard sound ? Date: Sun, 05 Oct 2003 13:08:49 -0100 Sender: linux-msdos-owner@vger.kernel.org Message-ID: <1065362927.4943.18.camel@localhost.localdomain> References: <3F7F5269.1090407@yahoo.com> Reply-To: numlock@freesurf.ch Mime-Version: 1.0 Content-Transfer-Encoding: QUOTED-PRINTABLE Return-path: In-Reply-To: <3F7F5269.1090407@yahoo.com> List-Id: Content-Type: text/plain; charset="utf-8" To: Stas Sergeev Cc: linux-msdos@vger.kernel.org Hi, Thanks for the patch and the help ! I applied it, made a 'make clean' then tried various values between [100..22050], but unfortunately I heard no improvement from the new compiles. Here's current status for all sound programs I have: - Gobliiins (=3D Goblins 1): distorted - Ween: distorted - Stunts: no sound in Soundblaster mode - Inca: double-speed, perhaps distorted - dosamp: ok in stereo About a workaround for the stereo issue, I didn't see it as "post-processing". Perhaps a simple option to prevent opening /dev/dsp in mono could be useful for people with buggy drivers (ie: i810) ? Best Regards, Jo=C3=ABl On Sat, 2003-10-04 at 22:06, Stas Sergeev wrote: > Hello. >=20 > Jo=D0=BBl Bourquard wrote: > > Ok, I've played with the value of 6000 and tried various possibilit= ies > > up to 120000, but the sound doesn't improve. > That's too much. 22050 is the maximum > reasonable value for that, but in > practice you'll in most cases need to > lower the freq from 6000, not raise it. >=20 > > There is something fishy, it seems. The sound is composed of a lot = of > > little "clicks". When a high sampling value (~60000) is used, it so= unds > > like the clicks become shorter. > Well, after all there might be a bug > somewhere. Try the attached patch and > see if it helps, then try tuning the > value again. >=20 > _____________________________________________________________________= _ > --- src/arch/linux/dosext/sound/linux_sound.c Sat Jul 5 23:14:10 200= 3 > +++ src/arch/linux/dosext/sound/linux_sound.c Sun Oct 5 02:43:44 200= 3 > @@ -261,6 +261,7 @@ > static int sound_frag =3D 0x0200007; > static uint8_t buffer[BUF_LEN]; > static size_t buffer_count =3D 0; > + int result; > =20 > buffer[buffer_count] =3D value; > if (buffer_count < BUF_LEN - 1) > @@ -274,20 +275,25 @@ > { > S_printf ("SB:[Linux] Initialising Direct DAC write (%u bits)\= n", bits); > if (linux_sb_dma_is_empty() =3D=3D DMA_HANDLER_OK) { > - bits_per_samp =3D bits; > + result =3D 0; > if (ioctl (dsp_fd, SNDCTL_DSP_SAMPLESIZE, &bits)<0) { > S_printf ("SB:[Linux] Warning: ioctl() (SAMPLESIZE) faile= d: %s\n", strerror(errno)); > - bits_per_samp =3D 0; > + result =3D -1; > } > if (linux_set_OSS_fragsize(sound_frag) =3D=3D DMA_HANDLER_NO= T_OK) { > S_printf ("SB:[Linux] Warning: failed to change sound fra= gment size.\n"); > - bits_per_samp =3D 0; > + result =3D -1; > } > linux_sb_set_speed(DIRECT_WRITE_FREQ, 0, 0, 0); > /* reset DMA settings */ > sample_rate =3D 0; > num_channels =3D 0; > oss_block_size =3D 0; > + if (result =3D=3D -1) { > + bits_per_samp =3D 0; > + return; > + } > + bits_per_samp =3D bits; > } > else { > S_printf("SB:[Linux] Sorry, can't change OSS settings now...= \n"); - To unsubscribe from this list: send the line "unsubscribe linux-msdos" = in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html