ac97 sound driver

Question about which tools to use, bugs, the best way to implement a function, etc should go here. Don't forget to see if your question is answered in the wiki first! When in doubt post here.
Post Reply
User avatar
pulsar
Member
Member
Posts: 49
Joined: Wed Nov 22, 2006 1:01 am
Location: chennai

ac97 sound driver

Post 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.
everyone here are best programmers ( not yet not yet)
urxae
Member
Member
Posts: 149
Joined: Sun Jul 30, 2006 8:16 am
Location: The Netherlands

Re: ac97 sound driver

Post 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.
User avatar
Combuster
Member
Member
Posts: 9301
Joined: Wed Oct 18, 2006 3:45 am
Libera.chat IRC: [com]buster
Location: On the balcony, where I can actually keep 1½m distance
Contact:

Post 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?
"Certainly avoid yourself. He is a newbie and might not realize it. You'll hate his code deeply a few years down the road." - Sortie
[ My OS ] [ VDisk/SFS ]
User avatar
Brendan
Member
Member
Posts: 8561
Joined: Sat Jan 15, 2005 12:00 am
Location: At his keyboard!
Contact:

Re: ac97 sound driver

Post 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
For all things; perfection is, and will always remain, impossible to achieve in practice. However; by striving for perfection we create things that are as perfect as practically possible. Let the pursuit of perfection be our guide.
Post Reply