From: Nathan Bryant <nbryant@allegientsystems.com>
To: Thomas Gschwind <tom@infosys.tuwien.ac.at>,
Doug Ledford <dledford@redhat.com>
Cc: linux-kernel@vger.kernel.org
Subject: Re: i810_audio
Date: Mon, 07 Jan 2002 18:12:29 -0500 [thread overview]
Message-ID: <3C3A2B5D.8070707@allegientsystems.com> (raw)
In-Reply-To: <20020105031329.B6158@infosys.tuwien.ac.at>
Thomas Gschwind wrote:
>I have integrated the SiS patches into Doug's code. Chances are that
>it works now also in combination with artsd. Can anybody test this
>please? And report your success (or failure)? In case it does not
>work you might want to change the fragsize to dmabuf->userfragsize
>inside the i810_poll function (line 1596). If I use
>dmabuf->userfragsize, however, I get loads of DMA buffer
>over/underruns in combination with xmms. According to the sepc, I
>think dmabuf->fragsize should be as correct as dmabuf->userfragsize.
>I have not found and minimum available space requirement in the poll
>man page or the OSS documentation I have?
>
Can you elaborate a little more? What do the buffer underflow sound
like, does it stop playing (silence) for a very short period and then
start again, or does it write ahead too far and overrite data that's
currently playing, causing garbled or repeated sound? Your email to me
describing this scenario left me a little confused.
The former would indicate simple scheduling latency--nothing that can be
done about that--and the latter might be a problem with i810_update_ptr
or get_free_write_space in your implementation. I haven't looked at your
code too much yet...
I assume you're using xmms with artsd. What is your artsd fragment size?
(Click on kde control center, go to sound/sound server/sound i/o)
I assume you're using the artsd default of 4096, which is larger than
the actual hardware chunk size of 2048. If your problem is nothing more
than latency-induced underruns, perhaps it would make more sense to use
MIN(userfragsize, fragsize) to determine the return status for
i810_poll. Doug, do you have any thoughts?
A buffer overrun is not the same as an underflow, even when we're
talking about a ring buffer ;)
>Fixes I applied except for the SiS integration:
>* drain_dac
> Use interruptible_sleep_on_timeout instead of schedule_timeout.
> I think this is cleaner. Set the timeout to
> (dmabuf->count * HZ * 2) / (dmabuf->rate * 4)
> since we play dmabuf->rate*4 bytes per second (16bit samples stereo).
> Added stop_dac at the end. Otherwise the system gets locked up sometimes.
>
Some sort of fix in the drain_dac area is probably needed for the real
Intel chips too; with 0.13 I was seeing a drain_dac: dma_timeout printk
occasionally on my setup which I hadn't bothered to debug yet. Didn't
hurt the machine and I figured it was maybe just dropped or latent
interrupts, so I got lazy. ;)
>* i810_read, i810_write
> Set the timeout to (dmabuf->size * HZ * 2) / (dmabuf->rate * 4)
> since we record / play dmabuf->rate*4 bytes per second (16bit samples
> stereo).
>
Does this solve a problem for your SiS chip? i810_write seemed to be
working fine on my setup. (Intel hardware.)
next prev parent reply other threads:[~2002-01-07 23:13 UTC|newest]
Thread overview: 35+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <3C338217.1080207@allegientsystems.com>
2002-01-05 2:13 ` i810_audio Thomas Gschwind
2002-01-07 19:32 ` i810_audio Nathan Bryant
2002-01-07 23:12 ` Nathan Bryant [this message]
2002-01-07 23:32 ` i810_audio Doug Ledford
2002-01-08 7:59 ` i810_audio Doug Ledford
2002-01-08 8:11 ` i810_audio Doug Ledford
2002-01-08 9:02 ` i810_audio Doug Ledford
2002-01-08 15:11 ` i810_audio Mario Mikocevic
2002-01-08 19:21 ` i810_audio Doug Ledford
2002-01-08 19:22 ` i810_audio Nathan Bryant
2002-01-09 15:47 ` i810_audio Mario Mikocevic
2002-01-08 20:01 ` i810_audio Nathan Bryant
2002-01-08 20:15 ` i810_audio Doug Ledford
2002-01-08 20:23 ` i810_audio Nathan Bryant
2002-01-08 8:22 ` i810_audio Martin Dalecki
2002-01-08 16:31 i810_audio willy tarreau
2002-01-08 19:58 ` i810_audio Doug Ledford
2002-01-08 23:03 ` i810_audio willy tarreau
2002-01-09 6:28 ` i810_audio Nick Papadonis
2002-01-09 7:16 ` i810_audio willy tarreau
-- strict thread matches above, loose matches on Subject: below --
2002-01-09 7:09 i810_audio reddog83
[not found] <3C3BFF98.9080309@redhat.com>
2002-01-09 9:08 ` i810_audio willy tarreau
2002-01-10 6:42 i810_audio reddog83
2002-01-10 18:59 i810_audio reddog83
2002-01-10 19:21 i810_audio reddog83
2002-01-11 0:33 ` i810_audio Doug Ledford
2002-11-10 23:37 i810 audio Alan Cox
2002-11-12 23:06 ` Brian C. Huffman
2002-11-12 23:38 ` Alan Cox
2002-11-12 23:43 ` Doug Ledford
2002-11-13 0:04 ` Peter Kundrat
2002-11-13 0:43 ` Alan Cox
2002-11-13 12:08 ` Brian C. Huffman
2002-11-12 23:52 ` Peter Kundrat
2002-11-11 21:16 i810_audio Rus Foster
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=3C3A2B5D.8070707@allegientsystems.com \
--to=nbryant@allegientsystems.com \
--cc=dledford@redhat.com \
--cc=linux-kernel@vger.kernel.org \
--cc=tom@infosys.tuwien.ac.at \
/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