Page MenuHomeFreeBSD

sound: Retire DSP_DEFAULT_SPEED
ClosedPublic

Authored by christos on Mon, Nov 3, 4:43 PM.
Tags
None
Referenced Files
Unknown Object (File)
Wed, Nov 5, 10:55 PM
Unknown Object (File)
Wed, Nov 5, 12:19 PM
Unknown Object (File)
Wed, Nov 5, 12:19 PM
Unknown Object (File)
Wed, Nov 5, 10:01 AM
Unknown Object (File)
Tue, Nov 4, 3:57 PM
Unknown Object (File)
Tue, Nov 4, 3:57 PM
Unknown Object (File)
Tue, Nov 4, 3:57 PM
Unknown Object (File)
Tue, Nov 4, 4:11 AM
Subscribers

Details

Summary

Only a few drivers use this, but this is not really our "default" speed.
And even those drivers most likely override that value at some point
once CHANNEL_SETSPEED() has been called.

Sponsored by: The FreeBSD Foundation
MFC after: 1 week

Diff Detail

Repository
rG FreeBSD src repository
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

Why not rename the constant to something more suitable? Why is 8000 used in these drivers as the initial value?

Why not rename the constant to something more suitable? Why is 8000 used in these drivers as the initial value?

I do not know why they use it as the initial value, and I'm a bit reluctant to change it to something more reasonable (44100), because I do not own these cards in order to test. My guess is what I explain in the commit message: they probably set it as a dummy value (along with the u8 format), and it gets immediately changed once CHANNEL_SETSPEED() and CHANNEL_SETFORMAT() are called when the card is properly initialized.

This revision is now accepted and ready to land.Tue, Nov 4, 1:00 PM

8kHz is (was?) the default if you just dumped data into /dev/dsp without any sound ioctls, e.g. cat /bin/ls > /dev/dsp

8kHz is (was?) the default if you just dumped data into /dev/dsp without any sound ioctls, e.g. cat /bin/ls > /dev/dsp

It was. I changed this in e89ee05b7cf1a ("sound: Initialize channels with sane default rate and format").

This revision was automatically updated to reflect the committed changes.