Page 1 of 1
ac97 sound driver
Posted: Wed Dec 13, 2006 5:40 am
by pulsar
Hi
i've been working on ac97 codec for long time and finally i finished writing a driver but the music misses something. It plays differently, i.e doesn't have that depth, then i verified the wav file's header, and found that bytes per second is 88200. But i thought bytes per second is same as sample rate which was 22050. So is there any specific registers to set bytes per second.
Mine is 845GVSR chipset
@Brendan : In your previous post i saw you were working on writing drivers for 865 chipset, and i wonder whether it's possible for you to give some information abour writing graphics driver.
Re: ac97 sound driver
Posted: Wed Dec 13, 2006 2:37 pm
by urxae
pulsar wrote:i've been working on ac97 codec for long time and finally i finished writing a driver but the music misses something. It plays differently, i.e doesn't have that depth, then i verified the wav file's header, and found that bytes per second is 88200. But i thought bytes per second is same as sample rate which was 22050.
Now I don't know much about sound drivers and formats and such, but I would think that (bytes per second) == (samples per second) * (bytes per sample). Since your file seems to have exactly 4 times as many bytes per second as samples, I'd guess each sample consists of 4 bytes...
So is there any specific registers to set bytes per second.
Sorry, can't help you there.
Posted: Wed Dec 13, 2006 3:02 pm
by Combuster
specifically:
bytes per second = Hz * bits_per_sample/8 * channels
you probably have 16 bit stereo: 22050 * 16/8 * 2 = 22050 * 4 = 88200
But i suppose the sound card could compute this number for you...
Semi-random suggestions:
The sound missing depth, IMO using 22kHz generally gives a dull sound. I don't suppose your music is skipping over or sounding distorted?
Maybe your chip has it and have to set both the lowpass and highpass filters?
Re: ac97 sound driver
Posted: Wed Dec 13, 2006 5:03 pm
by Brendan
Hi,
pulsar wrote:@Brendan : In your previous post i saw you were working on writing drivers for 865 chipset, and i wonder whether it's possible for you to give some information abour writing graphics driver.
I've looked into the memory controller for the 865 chipset (wondering how much of the space from 0x000A0000 to 0x000FFFFF could be used as RAM), the PIC chips, the I/O APIC connections, the PCI IRQ routers, and tried to make some sense of their TCO (Total Cost of Ownership) signals and power management (SMI/SMM, etc).
Most of this was to determine how useful a chipset driver could be - I haven't really looked at the inbuilt AGP/PCI devices (video, sound, USB controllers, etc), as these would be implemented as normal device drivers in my OS.
Cheers,
Brendan