Re: more patch for secondary buffer, polling and DMA emulation in pcm

1999-12-28 Thread Donn Miller

Seigo Tanimura wrote:

 Ouch, the patch broke Rollemup, so I fixed just now. The URI is the same.
 
 Seigo http://people.FreeBSD.org/~tanimura/patches/newmidi/2ndbuf-19991227.diff.gz

Great, the sound drivers are working very nicely on my ESS 1868. 
Does pcm support SoundBlaster WavEffects?  Hopefully, nobody will
do anything to break the sound drivers (although it may happen). 
I think I'll make a backup of my /sys/dev source code tree just
in case. ;-)

- Donn


To Unsubscribe: send mail to [EMAIL PROTECTED]
with "unsubscribe freebsd-current" in the body of the message



Re: more patch for secondary buffer, polling and DMA emulation in pcm

1999-12-27 Thread Seigo Tanimura

On Mon, 27 Dec 1999 03:39:56 -0500,
  Donn Miller [EMAIL PROTECTED] said:

 http://people.FreeBSD.org/~tanimura/patches/newmidi/2ndbuf-19991227.diff.gz

Donn Hmmm...  this seems to have broken the probe at boot time. 
Donn Here's a sample of my dmesg:
(snip)
Donn unknown1: ESS ES1868 Plug and Play AudioDrive at port
Donn 0x220-0x22f,0x388-0x38b,0x330-0x331 irq 5 drq 1,0 on isa0

That is odd... The patch does not even touch sbc.c. How does your
pnpinfo(1) look like?

-- 
Seigo Tanimura [EMAIL PROTECTED] [EMAIL PROTECTED]


To Unsubscribe: send mail to [EMAIL PROTECTED]
with "unsubscribe freebsd-current" in the body of the message



Re: more patch for secondary buffer, polling and DMA emulation in pcm

1999-12-27 Thread Seigo Tanimura

On Mon, 27 Dec 1999 16:08:01 +0900,
  Seigo Tanimura [EMAIL PROTECTED] said:

Seigo Another fix was made on feeding and sucking pcm data. Now chn_wrfeed()
Seigo and the other functions do not attempt excessive feeding during DMA
Seigo transfer to eat up the whole processor. The patch is at:

Ouch, the patch broke Rollemup, so I fixed just now. The URI is the same.

Seigo http://people.FreeBSD.org/~tanimura/patches/newmidi/2ndbuf-19991227.diff.gz

-- 
Seigo Tanimura [EMAIL PROTECTED] [EMAIL PROTECTED]


To Unsubscribe: send mail to [EMAIL PROTECTED]
with "unsubscribe freebsd-current" in the body of the message



Re: more patch for secondary buffer, polling and DMA emulation in pcm

1999-12-27 Thread Donn Miller

Seigo Tanimura wrote:
 
 Another fix was made on feeding and sucking pcm data. Now chn_wrfeed()
 and the other functions do not attempt excessive feeding during DMA
 transfer to eat up the whole processor. The patch is at:
 
 http://people.FreeBSD.org/~tanimura/patches/newmidi/2ndbuf-19991227.diff.gz

Hmmm...  this seems to have broken the probe at boot time. 
Here's a sample of my dmesg:

unknown0: ESS ES1868 Plug and Play AudioDrive at port
0x800-0x807 on isa0
unknown1: ESS ES1868 Plug and Play AudioDrive at port
0x220-0x22f,0x388-0x38b,0x330-0x331 irq 5 drq 1,0 on isa0
unknown2: ESS ES1868 Plug and Play AudioDrive at port 0x201 on
isa0

- Donn


To Unsubscribe: send mail to [EMAIL PROTECTED]
with "unsubscribe freebsd-current" in the body of the message



Re: more patch for secondary buffer, polling and DMA emulation in pcm

1999-12-26 Thread Seigo Tanimura

Another fix was made on feeding and sucking pcm data. Now chn_wrfeed()
and the other functions do not attempt excessive feeding during DMA
transfer to eat up the whole processor. The patch is at:

http://people.FreeBSD.org/~tanimura/patches/newmidi/2ndbuf-19991227.diff.gz

-- 
Seigo Tanimura [EMAIL PROTECTED] [EMAIL PROTECTED]


To Unsubscribe: send mail to [EMAIL PROTECTED]
with "unsubscribe freebsd-current" in the body of the message



Re: more patch for secondary buffer, polling and DMA emulation in pcm

1999-12-24 Thread Seigo Tanimura

On Fri, 24 Dec 1999 10:39:31 +0900,
  Seigo Tanimura [EMAIL PROTECTED] said:

Seigo players. My sound cards are SB32, SB64 and CS461x, so the problem is
Seigo likely to be in channel.c or dsp.c.

OK, here is the result of my investigation on RealPlayer 5.0:

RealPlayer 5.0 is an ill-behaving application in two points. First, it
passes a size of 16 to SNDCTL_DSP_SETFRAGMENT. This size is obviously
too small to buffer pcm data. Second, RealPlayer 5.0 often attempts to
write larger pcm data than the block size of the secondary buffer. The
result is to write only a part of pcm data ending up with an error,
and make polling really weird. AFAIK these problems are fixed in
RealPlayer G2.

The following fixes are somewhat klutzy, but seem to work:

- If a device is in nonblocking mode, adapt the block size to the
  pcm data to write.
- Poll the remaining size to write, rather than that of free space.

These fixes are included in:

http://people.freebsd.org/~tanimura/patches/newmidi/2ndbuf-19991225.diff.gz

-- 
Seigo Tanimura [EMAIL PROTECTED] [EMAIL PROTECTED]


To Unsubscribe: send mail to [EMAIL PROTECTED]
with "unsubscribe freebsd-current" in the body of the message



Re: more patch for secondary buffer, polling and DMA emulation in pcm

1999-12-23 Thread Seigo Tanimura

On Mon, 20 Dec 1999 13:44:02 +0900,
  Seigo Tanimura [EMAIL PROTECTED] said:

Seigo If you have a trouble playing pcm with some applications, could you
Seigo please try the patch attached below? The patch does the following things:

Seigo - All ioctl(2)s go to see the secondary buffer(if I have forget nothing).
Seigo - chn_setblocksize() changes the size of the secondary buffer.
Seigo - chn_mmap() maps the secondary buffer.
Seigo - chn_poll() invokes DMA.
Seigo - chn_wrintr() performs DMA emulation for pcm devices with no DMA
Seigo   functionality(requested by nyan).

Seigo With the patch, snes9x(w/-r 7) and RealPlayer G2 for Linux worked fine.
Seigo The range of blksz in chn_setblocksize() may need further tuning...


The patch has been updated slightly. Now snes9x works with any pcm
quality you like. The new features are:

- SNDCTL_DSP_SETFRAGMENT handles the count correctly.
- GETI/OSPACE returns the number of fragments.
- DMA transfer keeps running upon underrun. Some DSPs seem to end up
  with an unpredictable result if the DMA gets stopped followed by
  immediate restart. This revokes the change in sys/dev/sound/pcm/channel.c
  rev 1.12.


 2ndbuf-19991223.diff.gz


-- 
Seigo Tanimura [EMAIL PROTECTED] [EMAIL PROTECTED]



Re: more patch for secondary buffer, polling and DMA emulation in pcm

1999-12-23 Thread Seigo Tanimura

On Thu, 23 Dec 1999 19:18:26 +0900,
  Seigo Tanimura [EMAIL PROTECTED] said:

Seigo The patch has been updated slightly. Now snes9x works with any pcm
Seigo quality you like. The new features are:

Still more fix has been made:

- chn_write() and chn_read() returns EAGAIN for nonblocking if there
  are no space to write or data to read.

As the patch is now quite large, I have put it at:

http://people.FreeBSD.org/~tanimura/patches/newmidi/2ndbuf-19991223.diff.gz

-- 
Seigo Tanimura [EMAIL PROTECTED] [EMAIL PROTECTED]


To Unsubscribe: send mail to [EMAIL PROTECTED]
with "unsubscribe freebsd-current" in the body of the message



Re: more patch for secondary buffer, polling and DMA emulation in pcm

1999-12-23 Thread Donn Miller

Seigo Tanimura wrote:
 
 On Mon, 20 Dec 1999 13:44:02 +0900,
   Seigo Tanimura [EMAIL PROTECTED] said:
 
 Seigo If you have a trouble playing pcm with some applications, could you
 Seigo please try the patch attached below? The patch does the following things:


Actually, the patch makes things worse for me on the ESS 1868,
which is an ISA card in my case.  When I press "play" in
RealPlayer-5.0, the first 4 seconds skip repeatedly, and then the
whole thing stops.  Also, I get a "general error occured" and a
write error when I first press play.  This message occurs
immediately the clip begins playing, at which time the first 4
seconds play repeatedly.





- Donn


To Unsubscribe: send mail to [EMAIL PROTECTED]
with "unsubscribe freebsd-current" in the body of the message