#
a593f6b8 |
| 15-Jun-2009 |
Andrew Thompson <thompsa@FreeBSD.org> |
s/usb2_/usb_|usbd_/ on all function names for the USB stack.
|
#
7e857dd1 |
| 12-Jun-2009 |
Oleksandr Tymoshenko <gonzo@FreeBSD.org> |
- Merge from HEAD
|
#
90da2b28 |
| 07-Jun-2009 |
Ariff Abdullah <ariff@FreeBSD.org> |
Sound Mega-commit. Expect further cleanup until code freeze.
For a slightly thorough explaination, please refer to [1] http://people.freebsd.org/~ariff/SOUND_4.TXT.html .
Summary of changes includ
Sound Mega-commit. Expect further cleanup until code freeze.
For a slightly thorough explaination, please refer to [1] http://people.freebsd.org/~ariff/SOUND_4.TXT.html .
Summary of changes includes:
1 Volume Per-Channel (vpc). Provides private / standalone volume control unique per-stream pcm channel without touching master volume / pcm. Applications can directly use SNDCTL_DSP_[GET|SET][PLAY|REC]VOL, or for backwards compatibility, SOUND_MIXER_PCM through the opened dsp device instead of /dev/mixer. Special "bypass" mode is enabled through /dev/mixer which will automatically detect if the adjustment is made through /dev/mixer and forward its request to this private volume controller. Changes to this volume object will not interfere with other channels.
Requirements: - SNDCTL_DSP_[GET|SET][PLAY|REC]_VOL are newer ioctls (OSSv4) which require specific application modifications (preferred). - No modifications required for using bypass mode, so applications like mplayer or xmms should work out of the box.
Kernel hints: - hint.pcm.%d.vpc (0 = disable vpc).
Kernel sysctls: - hw.snd.vpc_mixer_bypass (default: 1). Enable or disable /dev/mixer bypass mode. - hw.snd.vpc_autoreset (default: 1). By default, closing/opening /dev/dsp will reset the volume back to 0 db gain/attenuation. Setting this to 0 will preserve its settings across device closing/opening. - hw.snd.vpc_reset (default: 0). Panic/reset button to reset all volume settings back to 0 db. - hw.snd.vpc_0db (default: 45). 0 db relative to linear mixer value.
2 High quality fixed-point Bandlimited SINC sampling rate converter, based on Julius O'Smith's Digital Audio Resampling - http://ccrma.stanford.edu/~jos/resample/. It includes a filter design script written in awk (the clumsiest joke I've ever written) - 100% 32bit fixed-point, 64bit accumulator. - Possibly among the fastest (if not fastest) of its kind. - Resampling quality is tunable, either runtime or during kernel compilation (FEEDER_RATE_PRESETS). - Quality can be further customized during kernel compilation by defining FEEDER_RATE_PRESETS in /etc/make.conf.
Kernel sysctls: - hw.snd.feeder_rate_quality. 0 - Zero-order Hold (ZOH). Fastest, bad quality. 1 - Linear Interpolation (LINEAR). Slightly slower than ZOH, better quality but still does not eliminate aliasing. 2 - (and above) - Sinc Interpolation(SINC). Best quality. SINC quality always start from 2 and above.
Rough quality comparisons: - http://people.freebsd.org/~ariff/z_comparison/
3 Bit-perfect mode. Bypasses all feeder/dsp effects. Pure sound will be directly fed into the hardware.
4 Parametric (compile time) Software Equalizer (Bass/Treble mixer). Can be customized by defining FEEDER_EQ_PRESETS in /etc/make.conf.
5 Transparent/Adaptive Virtual Channel. Now you don't have to disable vchans in order to make digital format pass through. It also makes vchans more dynamic by choosing a better format/rate among all the concurrent streams, which means that dev.pcm.X.play.vchanformat/rate becomes sort of optional.
6 Exclusive Stream, with special open() mode O_EXCL. This will "mute" other concurrent vchan streams and only allow a single channel with O_EXCL set to keep producing sound.
Other Changes: * most feeder_* stuffs are compilable in userland. Let's not speculate whether we should go all out for it (save that for FreeBSD 16.0-RELEASE). * kobj signature fixups, thanks to Andriy Gapon <avg@freebsd.org> * pull out channel mixing logic out of vchan.c and create its own feeder_mixer for world justice. * various refactoring here and there, for good or bad. * activation of few more OSSv4 ioctls() (see [1] above). * opt_snd.h for possible compile time configuration: (mostly for debugging purposes, don't try these at home) SND_DEBUG SND_DIAGNOSTIC SND_FEEDER_MULTIFORMAT SND_FEEDER_FULL_MULTIFORMAT SND_FEEDER_RATE_HP SND_PCM_64 SND_OLDSTEREO
Manual page updates are on the way.
Tested by: joel, Olivier SMEDTS <olivier at gid0 d org>, too many unsung / unnamed heroes.
show more ...
|
#
c737a632 |
| 04-Jun-2009 |
Andrew Thompson <thompsa@FreeBSD.org> |
revert r162516. We only support 1 or 2 channels per stream which reflects mono and stereo.
Submitted by: Hans Petter Selasky
|
#
e0a69b51 |
| 29-May-2009 |
Andrew Thompson <thompsa@FreeBSD.org> |
s/usb2_/usb_/ on all typedefs for the USB stack.
|
#
760bc48e |
| 28-May-2009 |
Andrew Thompson <thompsa@FreeBSD.org> |
s/usb2_/usb_/ on all C structs for the USB stack.
|
#
1ff76828 |
| 27-May-2009 |
Andrew Thompson <thompsa@FreeBSD.org> |
Provide a workaround for USB devices that do not support mono or stereo operation by overriding the channel count.
Submitted by: Hans Petter Selasky Reported by: MIHIRA Sanpei Yoshiro
|
#
2e370a5c |
| 26-May-2009 |
Oleksandr Tymoshenko <gonzo@FreeBSD.org> |
Merge from HEAD
|
#
fadc970b |
| 21-May-2009 |
Andrew Thompson <thompsa@FreeBSD.org> |
Fix a few variable renames of usb2_mode outside dev/usb.
|
#
1d631ee6 |
| 20-May-2009 |
Joel Dahl <joel@FreeBSD.org> |
Remove license clauses 3 and 4 as per rev. 1.112 of uaudio.c and rev. 1.15 of uaudioreg.h in NetBSD.
|
Revision tags: release/7.2.0_cvs, release/7.2.0 |
|
#
9c797940 |
| 13-Apr-2009 |
Oleksandr Tymoshenko <gonzo@FreeBSD.org> |
- Merge from HEAD
|
#
4eae601e |
| 05-Apr-2009 |
Andrew Thompson <thompsa@FreeBSD.org> |
MFp4 //depot/projects/usb@159909
- make usb2_power_mask_t 16-bit - remove "usb2_config_sub" structure from "usb2_config". To compensate for this "usb2_config" has a new field called "usb_mode" whi
MFp4 //depot/projects/usb@159909
- make usb2_power_mask_t 16-bit - remove "usb2_config_sub" structure from "usb2_config". To compensate for this "usb2_config" has a new field called "usb_mode" which select for which mode the current xfer entry is active. Options are: a) Device mode only b) Host mode only (default-by-zero) c) Both modes. This change was scripted using the following sed script: "s/\.mh\././g". - the standard packet size table in "usb_transfer.c" is now a function, hence the code for the function uses less memory than the table itself.
Submitted by: Hans Petter Selasky
show more ...
|
#
1829d5da |
| 12-Mar-2009 |
Warner Losh <imp@FreeBSD.org> |
Update the projects tree to a newer FreeBSD current.
|
#
9aef556d |
| 02-Mar-2009 |
Andrew Thompson <thompsa@FreeBSD.org> |
Rename the ushub device class back to uhub as it was in the old usb stack, moused(8) looks for "uhub/ums" to decide if needs to load the module.
Reported by: Garrett Cooper
|
#
ee3e3ff5 |
| 27-Feb-2009 |
Andrew Thompson <thompsa@FreeBSD.org> |
Change USB over to make_dev() for all device nodes, previously it hooked into the devfs clone handler to open the (invisible) devices on the fly.
The /dev entries are layed out as follows,
/dev/us
Change USB over to make_dev() for all device nodes, previously it hooked into the devfs clone handler to open the (invisible) devices on the fly.
The /dev entries are layed out as follows,
/dev/usbctl = master device /dev/usb/0.1.0.5 = usb device, (<bus>.<dev>.<iface>.<endpoint>) /dev/ugen0.1 -> usb/0.1.0.0 = ugen link to ctrl endpoint
This also removes the custom permissions model from USB. Bump __FreeBSD_version to 800066.
Submitted by: rink (earlier version)
show more ...
|
#
3a3f90c6 |
| 23-Feb-2009 |
Andrew Thompson <thompsa@FreeBSD.org> |
Move the uaudio and ata-usb drivers into their correct locations.
|
Revision tags: release/7.1.0_cvs, release/7.1.0, release/6.4.0_cvs, release/6.4.0 |
|
#
25ee8cca |
| 23-Aug-2008 |
Warner Losh <imp@FreeBSD.org> |
Handle the error case properly for device_get_children.
|
Revision tags: release/7.0.0_cvs, release/7.0.0, release/6.3.0_cvs, release/6.3.0 |
|
#
7bd250d8 |
| 20-Jun-2007 |
Warner Losh <imp@FreeBSD.org> |
s/logprintf/printf/g
Approved by: re@
|
#
528fb030 |
| 19-Jun-2007 |
Warner Losh <imp@FreeBSD.org> |
Explicitly use usb_port.h to get compat macros.
|
#
e4e61333 |
| 16-Jun-2007 |
Ariff Abdullah <ariff@FreeBSD.org> |
Last (again ?!?) major commit for RELENG_7, featuring total Giant eradication in/from userland path, countless locking fixes, etc.
- General sleep call through msleep(9) has been converted to condva
Last (again ?!?) major commit for RELENG_7, featuring total Giant eradication in/from userland path, countless locking fixes, etc.
- General sleep call through msleep(9) has been converted to condvar(9) with better consistencies. - Heavily guard every possible "slow path" entries (open(), close(), few ioctl()s, sysctls), but once it entering "fast path" (io, interrupt started), they are free to fly on their own. - Rearrange locking sequences, resulting better concurrency and serialization. Large part doesn't even need locking at all, and will be removed in future. Less clutter, except in few places due to lock ordering. - Anonymous mixer object creation/deletion to simplify mixer handling beyond typical mixer ioctls. Submitted by: chibis (with modifications) - Add few mix_[get|set|..] functions to avoid calling mixer_ioctl() directly using cryptic arguments. - Locking fixes to avoid possible deadlock with (still under Giant) USB. - Better simplex/duplex device handling. - Recover mmap() functionality for recording, which has been lost since 2.2.x - 3.x (the introduction of newpcm). Full-duplex mmap still doesn't work (due to VM/page design), but people still can mmap both by opening each direction separately. mmaped playback is guarantee to work either way. - New sysctl: "hw.snd.compat_linux_mmap" to allow PROT_EXEC page mapping, due to recent changes in linux compatibility layer which require it. All linux applications that using sound + mmap() (mostly games) require this to be enabled. Disabled by default. - Other goodies.. too many, that will increase releng7 shareholder value and make users of releng6 (and below) cry ;)
* This commit should be atomic. If anything goes wrong (not counting problem originated from elsewhere), I will not hesitate to revert everything back within 12 hours. This substantial changes itself not a rocket science and the process has begun for almost 2 years, and lots of incremental changes are already in place during that period of time. * Some issues does occur in snd_emu10kx (note the 'x') due to various internal locking issues and it is currently being worked on by chibis.
Tested by: chibis (Yuriy Tsibizov), joel, Alexandre Vieira, many innocent souls...
show more ...
|
#
645016c0 |
| 12-Jun-2007 |
Warner Losh <imp@FreeBSD.org> |
Expand USB_ATTACH_{ERROR,SUCCESS}_RETURN inline and eliminate from usb_port.h. They aren't needed, and are a legacy of this code's past.
|
#
471f8f34 |
| 10-Jun-2007 |
Matt Jacob <mjacob@FreeBSD.org> |
Remove const type qualifier from a function- gcc4.2 doesn't accept it.
Reviewed by: Ariff
|
#
1f082787 |
| 09-Jun-2007 |
Ruslan Ermilov <ru@FreeBSD.org> |
Make this compile.
|
#
8d58ce65 |
| 09-Jun-2007 |
Warner Losh <imp@FreeBSD.org> |
Expand USB_ATTACH_SETUP inline + devinfo tweaks
# looks like there's a chance that uaudio might compile on otherBSD, so leave # those #defines alone as well as make this change in a compatible way.
|
#
bba4862c |
| 31-May-2007 |
Ariff Abdullah <ariff@FreeBSD.org> |
Last major commit and updates for RELENG_7:
- Rework the entire pcm_channel structure: * Remove rarely used link placeholder, instead, make each pcm_channel as head/link of each own/each other
Last major commit and updates for RELENG_7:
- Rework the entire pcm_channel structure: * Remove rarely used link placeholder, instead, make each pcm_channel as head/link of each own/each other. Unlock - Lock sequence due to sleep malloc has been reduced. * Implement "busy" queue which will contain list of busy/active channels. This greatly reduce locking contention for example while servicing interrupt for hardware with many channels or when virtual channels reach its 256 peak channels.
- So I heard you like v chan ... O RLY? Welcome to Virtual **Record** Channels (vrec, rec vchans, vchans for recording, Rec-Chan, you decide), the ultimate solutions for your nagging O_RDWR full-duplex wannabe (note: flash plugins) monopolizing single record channel causing EBUSY. Vrec works exactly like Vchans (or, should I rename it to "Vplay" :) , except that it operates on the opposite direction (recording). Up to 256 vrecs (like vchans) are possible.
Notes: * Relocate dev.pcm.%d.{vchans,vchanformat,vchanrate} to each of its respective node/direction: dev.pcm.%d.play.* for "play" (cdev = dsp%d.vp%d) dev.pcm.%d.rec.* for "record" (cdev = dsp%d.vr%d) * Don't expect that it will magically give you ability to split "recording source" (eg: 1 channel for cdrom, 1 channel for mic, etc). Just admit that you only have a *single* recording source / channel. Please bug your hardware vendor instead :)
- Bump maxautovchans from 4 to 16. For a full-fledged multimedia desktop/workstation with too many soundservers installed (esound, artsd, jackd, pulse/polypaudio, ding-dong pling plong mudkip fuh fuh, etc), 4 seems inadequate. There will be no memory penalty here, since virtual channels are allocate only by demand.
- Nuke/Rework the entire statically created cdev entries. Everything is clonable through snd own clone manager which designed to withstand many kind of abusive devfs droids such as: * while : ; do /bin/test -e /dev/dsp ; done * jot 16777216 0 | while read x ; do ls /dev/dsp0.$x ; done * hundreds (could be thousands) concurrent threads/process opening "/dev/dsp" (previously, this might result EBUSY even with just 3 contesting threads/procs). o Reusable clone objects (instead of creating new one like there's no tomorrow) after certain expiration deadline. The clone allocator will decide whether to reuse, share, or creating new clone. o Automatic garbage collector.
- Dynamic unit magic allocator. Maximum attached soundcards can be tuned using tunable "hw.snd.maxunit" (Default to 512). Minimum is 16, and maximum is 2048.
- ..other fixes, mostly related to concurrency issues.
joel@ will do the manpage updates on sound(4).
Have fun.
show more ...
|