I am processing sound data on /dev/dsp. Generally the ~61k devive buffer
is enough to keep the device satiated && gives the program time to fill
up the device buffer when there is 16k of buffer space that needs to be
filled.
But on occasion the /dev/dsp device "slurrs" ( sounds like what happens
when the speed of a tape recorder slows down due to a finger placed down
on the capstain ) unexpectedly. This was eventually traced to the usage
of an IDE disk drive. using the scsi drive does not cause the problem to
manifest itself( at least my ears say so ). but using "dd if=/dev/hda4
of=/dev/null ) does immediately cause the slurring to happen.
I think I can create a simple pgm to demo this problem, but the DATA
file that gets feed into /dev/dsp is a little large for e-mail.
/gat
Hello GAT,
Can you be more specific? I need a kernel and hardware info and generally
more info than what is given. Is this a PIO/DMA process is it a laptop or
unsupported hardware?
On Mon, 26 Mar 2001, Uncle George wrote:
> I am processing sound data on /dev/dsp. Generally the ~61k devive buffer
> is enough to keep the device satiated && gives the program time to fill
> up the device buffer when there is 16k of buffer space that needs to be
> filled.
>
> But on occasion the /dev/dsp device "slurrs" ( sounds like what happens
> when the speed of a tape recorder slows down due to a finger placed down
> on the capstain ) unexpectedly. This was eventually traced to the usage
> of an IDE disk drive. using the scsi drive does not cause the problem to
How did you derive this path to the ATA driver?
What is the drive, and how fast (or how slow) is it?
> manifest itself( at least my ears say so ). but using "dd if=/dev/hda4
> of=/dev/null ) does immediately cause the slurring to happen.
>
>
> I think I can create a simple pgm to demo this problem, but the DATA
> file that gets feed into /dev/dsp is a little large for e-mail.
The content of the barf is not important, but the process you are doing to
create this issue is.
Andre Hedrick
Linux ATA Development
The system is a Compaq XP1000 ( 667Mhz Alpha processor ). The
ON-motherboard IDE controller ( there is only one ) originally just had
a cdrom attached. When I got the system I added a 30gig maxtor drive.
There is no second controller ( ergo no /dev/hdc * /dev/hdd ) builtin,
so the IDE system was probably not a main selling point of the system.
changing the parameters for the IDE disk drive does not do much in terms
if the timing tests. I'll see if it changes the 'sound effects' as soon
as i look on the motherboard for the ide controller chip.
The system specs as the Redhat/linux/6.2 with linux-2.2.14-7.0 (
floating point fixes ) /var/log/messages has:
Mar 27 06:38:08 Java kernel: rtc: Digital UNIX epoch (1952) detected
Mar 27 06:38:08 Java kernel: PCI_IDE: unknown IDE controller on PCI bus
00 device 39, VID=1080, DID=c693
Mar 27 06:38:08 Java kernel: PCI_IDE: not 100% native mode: will probe
irqs later
Mar 27 06:38:08 Java kernel: ide0: BM-DMA at 0x1100-0x1107, BIOS
settings: hda:pio, hdb:pio
Mar 27 06:38:08 Java kernel: ide1: BM-DMA at 0x1108-0x110f, BIOS
settings: hdc:pio, hdd:pio
Mar 27 06:38:08 Java kernel: PCI_IDE: unknown IDE controller on PCI bus
00 device 3a, VID=1080, DID=c693
Mar 27 06:38:08 Java kernel: PCI_IDE: not 100% native mode: will probe
irqs later
Mar 27 06:38:08 Java kernel: PCI_IDE: port 0x01f0 already claimed by
ide0
Mar 27 06:38:08 Java kernel: PCI_IDE: port 0x0170 already claimed by
ide1
Mar 27 06:38:08 Java kernel: PCI_IDE: neither IDE port enabled (BIOS)
Mar 27 06:38:08 Java kernel: hda: Maxtor 53073U6, ATA DISK drive
Mar 27 06:38:08 Java kernel: hdb: Compaq CRD-8322B, ATAPI CDROM drive
Mar 27 06:38:08 Java kernel: ide0 at 0x1f0-0x1f7,0x3f6 on irq 14
Mar 27 06:38:08 Java kernel: hda: Maxtor 53073U6, 29311MB w/2048kB
Cache, CHS=59554/16/63, (U)DMA
Mar 27 06:38:09 Java kernel: hdb: ATAPI 32X CD-ROM drive, 128kB Cache
Mar 27 06:38:09 Java kernel: Uniform CDROM driver Revision: 2.56
Mar 27 06:38:09 Java kernel: Floppy drive(s): fd0 is 2.88M
[root@Java gat]# /sbin/hdparm -i /dev/hda
/dev/hda:
Model=Maxtor 53073U6, FwRev=DAC10SC0, SerialNo=K60CR35C
Config={ Fixed }
RawCHS=16383/16/63, TrkSize=0, SectSize=0, ECCbytes=57
BuffType=3(DualPortCache), BuffSize=2048kB, MaxMultSect=16,
MultSect=off
DblWordIO=no, OldPIO=2, DMA=yes, OldDMA=0
CurCHS=16383/16/63, CurSects=-66060037, LBA=yes, LBAsects=60030432
tDMA={min:120,rec:120}, DMA modes: mword0 mword1 *mword2
IORDY=on/off, tPIO={min:120,w/IORDY:120}, PIO modes: mode3 mode4
UDMA modes: mode0 mode1 mode2 mode3 mode4
[root@Java gat]# /sbin/hdparm -t /dev/hda
/dev/hda:
Timing buffered disk reads: 64 MB in 20.11 seconds = 3.18 MB/sec
[root@Java gat]#
[root@Java gat]# /sbin/hdparm -u 1 -m 16 -c 1 -d 1 /dev/hda
/dev/hda:
setting 32-bit I/O support flag to 1
setting multcount to 16
setting unmaskirq to 1 (on)
setting using_dma to 1 (on)
multcount = 16 (on)
I/O support = 1 (32-bit)
unmaskirq = 1 (on)
using_dma = 1 (on)
[root@Java gat]# /sbin/hdparm -t /dev/hda
/dev/hda:
Timing buffered disk reads: 64 MB in 20.05 seconds = 3.19 MB/sec
[root@Java gat]#
Andre Hedrick wrote:
>
> Hello GAT,
>
> Can you be more specific? I need a kernel and hardware info and generally
> more info than what is given. Is this a PIO/DMA process is it a laptop or
> unsupported hardware?
>
> On Mon, 26 Mar 2001, Uncle George wrote:
>
> > I am processing sound data on /dev/dsp. Generally the ~61k devive buffer
> > is enough to keep the device satiated && gives the program time to fill
> > up the device buffer when there is 16k of buffer space that needs to be
> > filled.
> >
> > But on occasion the /dev/dsp device "slurrs" ( sounds like what happens
> > when the speed of a tape recorder slows down due to a finger placed down
> > on the capstain ) unexpectedly. This was eventually traced to the usage
> > of an IDE disk drive. using the scsi drive does not cause the problem to
>
> How did you derive this path to the ATA driver?
> What is the drive, and how fast (or how slow) is it?
>
> > manifest itself( at least my ears say so ). but using "dd if=/dev/hda4
> > of=/dev/null ) does immediately cause the slurring to happen.
> >
> >
> > I think I can create a simple pgm to demo this problem, but the DATA
> > file that gets feed into /dev/dsp is a little large for e-mail.
>
> The content of the barf is not important, but the process you are doing to
> create this issue is.
>
> Andre Hedrick
> Linux ATA Development
#define PCI_VENDOR_ID_CONTAQ 0x1080
#define PCI_DEVICE_ID_CONTAQ_82C599 0x0600
#define PCI_DEVICE_ID_CONTAQ_82C693 0xc693
* linux/drivers/block/cy82c693.c Version 0.34 Dec. 13, 1999
*
* Copyright (C) 1998-99 Andreas S. Krebs ([email protected]), Maintainer
* Copyright (C) 1998-99 Andre Hedrick, Integrater
* Notes:
* - I recently got a 16.8G IBM DTTA, so I was able to test it with
* a large and fast disk - the results look great, so I'd say the
* driver is working fine :-)
* hdparm -t reports 8.17 MB/sec at about 6% CPU usage for the DTTA
* - this is my first linux driver, so there's probably a lot of room
* for optimizations and bug fixing, so feel free to do it.
* - use idebus=xx parameter to set PCI bus speed - needed to calc
* timings for PIO modes (default will be 40)
* - if using PIO mode it's a good idea to set the PIO mode and
* 32-bit I/O support (if possible), e.g. hdparm -p2 -c1 /dev/hda
* - I had some problems with my IBM DHEA with PIO modes < 2
* (lost interrupts) ?????
* - first tests with DMA look okay, they seem to work, but there is a
* problem with sound - the BusMaster IDE TimeOut should fixed this
This is your fix....
Andre Hedrick
Linux ATA Development
ASL Kernel Development
-----------------------------------------------------------------------------
ASL, Inc. Toll free: 1-877-ASL-3535
1757 Houret Court Fax: 1-408-941-2071
Milpitas, CA 95035 Web: http://www.aslab.com
The fix is a lot simpler. It has to be placed in release notes that the
generic ide can cause the sound device to distort the sound stream.
Would that be a fair statement ?
Andre Hedrick wrote:
>
>
>
> This is your fix....
>
> Andre Hedrick
>
On Tue, 27 Mar 2001, Uncle George wrote:
> The fix is a lot simpler. It has to be placed in release notes that the
> generic ide can cause the sound device to distort the sound stream.
> Would that be a fair statement ?
GAT,
Not sure how to comment, but did enabling the chipset code make it work?
Second your case is one where the generic code can not find DMA space,
therefore you are forced into PIO, and that will place the system under an
extra load to potential produce your problem.
So the question back is does the chipset code work?
If so then a generic blurb about sound would be valid in at least two
cases and that make a good case for inclusion.
> Andre Hedrick wrote:
> >
> >
> >
> > This is your fix....
> >
> > Andre Hedrick
> >
> -
> To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
> the body of a message to [email protected]
> More majordomo info at http://vger.kernel.org/majordomo-info.html
> Please read the FAQ at http://www.tux.org/lkml/
>
Andre Hedrick
Linux ATA Development
ASL Kernel Development
-----------------------------------------------------------------------------
ASL, Inc. Toll free: 1-877-ASL-3535
1757 Houret Court Fax: 1-408-941-2071
Milpitas, CA 95035 Web: http://www.aslab.com