public inbox for linux-msdos@vger.kernel.org
 help / color / mirror / Atom feed
From: Stas Sergeev <stssppnn@yahoo.com>
To: linux-msdos@vger.kernel.org
Subject: Re: Hi, does someone use i810 onboard sound ?
Date: Sun, 05 Oct 2003 03:06:17 +0400	[thread overview]
Message-ID: <3F7F5269.1090407@yahoo.com> (raw)

[-- Attachment #1: Type: text/plain, Size: 606 bytes --]

Hello.

Joлl Bourquard wrote:
> Ok, I've played with the value of 6000 and tried various possibilities
> 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.

> 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 sounds
> 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.

[-- Attachment #2: dirdac.diff --]
[-- Type: text/plain, Size: 1416 bytes --]

--- src/arch/linux/dosext/sound/linux_sound.c	Sat Jul  5 23:14:10 2003
+++ src/arch/linux/dosext/sound/linux_sound.c	Sun Oct  5 02:43:44 2003
@@ -261,6 +261,7 @@
   static int sound_frag = 0x0200007;
   static uint8_t buffer[BUF_LEN];
   static size_t buffer_count = 0;
+  int result;
 
   buffer[buffer_count] = 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() == DMA_HANDLER_OK) {
-        bits_per_samp = bits;
+        result = 0;
         if (ioctl (dsp_fd, SNDCTL_DSP_SAMPLESIZE, &bits)<0) {
            S_printf ("SB:[Linux] Warning: ioctl() (SAMPLESIZE) failed: %s\n", strerror(errno));
-           bits_per_samp = 0;
+           result = -1;
         }
         if (linux_set_OSS_fragsize(sound_frag) == DMA_HANDLER_NOT_OK) {
            S_printf ("SB:[Linux] Warning: failed to change sound fragment size.\n");
-           bits_per_samp = 0;
+           result = -1;
         }
         linux_sb_set_speed(DIRECT_WRITE_FREQ, 0, 0, 0);
         /* reset DMA settings */
         sample_rate = 0;
         num_channels = 0;
         oss_block_size = 0;
+        if (result == -1) {
+          bits_per_samp = 0;
+          return;
+        }
+        bits_per_samp = bits;
       }
       else {
         S_printf("SB:[Linux] Sorry, can't change OSS settings now...\n");

             reply	other threads:[~2003-10-04 23:06 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2003-10-04 23:06 Stas Sergeev [this message]
2003-10-05 14:08 ` Hi, does someone use i810 onboard sound ? Joël Bourquard
  -- strict thread matches above, loose matches on Subject: below --
2003-10-06 18:48 Stas Sergeev
2003-10-05 13:01 Stas Sergeev
2003-10-05 23:23 ` Joël Bourquard
2003-10-04 23:58 Joël Bourquard
2003-10-04 22:11 Stas Sergeev
2003-10-05  0:28 ` Ryan Underwood
2003-10-04 21:31 Stas Sergeev
2003-10-05  1:00 ` Joël Bourquard

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=3F7F5269.1090407@yahoo.com \
    --to=stssppnn@yahoo.com \
    --cc=linux-msdos@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox