summaryrefslogtreecommitdiffstats
path: root/sys/dev/sound/pcm/mixer.c
Commit message (Collapse)AuthorAgeFilesLines
* mega-commit.cg2001-03-241-63/+75
| | | | | | | | | | | | | | | this introduces a new buffering mechanism which results in dramatic simplification of the channel manager. as several structures have changed, we take the opportunity to move their definitions into the source files where they are used, make them private and de-typedef them. the sound drivers are updated to use snd_setup_intr instead of bus_setup_intr, and to comply with the de-typedefed structures. the ac97, mixer and channel layers have been updated with finegrained locking, as have some drivers- not all though. the rest will follow soon.
* MFS: 4.x/5.x compatibility #ifdefscg2001-02-271-0/+6
|
* - Move all of the hwvol functions into a mixer_hwvol_* namespace, and makejhb2001-01-111-10/+16
| | | | | | | | | | | all of the hwvol members of struct snd_mixer live in a hwvol_* namespace. - When changing the mixer device via the hwvol_mixer sysctl, reset the muted state so that a mute operation on a new device won't try to unmute the new device with the old device's saved volume. - When the volume is muted, if a down or up volume request is received, first restore the saved volume level and then adjust it. Reviewed by: cg
* - Make the 'hwvol_mixer' and 'hwvol_step' variables be specific to ajhb2001-01-051-9/+66
| | | | | | | | | | | | | | | | | | specific snd_mixer device rather than global across all mixers. - Add per-mixer mute status and saved mute_level so that the mixer_hwmute() function can now toggle the mute state when the mute button is pressed. - Create a dynamic sysctl tree hw.snd.pcmX when a pcm device is registered. - Move the hw.snd.hwvol_* sysctl's to hw.snd.pcmX.hwvol_* so that they are now properly device-specific. Eventually when the mixers become their own devices these sysctl's will move to live under a mixerX tree. - Change the interface of the hwvol_mixer sysctl so that it reports the name of the current mixer device instead of the number and is settable with the name instead of the number. - Add a new function mixer_hwinit() used to setup the dynamic sysctl's needed for the hwvol support that can be called by drivers that support hwvol. Reviewed by: cg
* Add a new API for soundcards that have hardware volume control:jhb2001-01-031-0/+36
| | | | | | | | | | | | - The mixer_hwmute() function can be called when a soundcard receives a mute request. - The mixer_hwstep() function can be used to adjust the volume of one or both channels. - The 'hw.snd.hwvol_step' sysctl determines the amount that mixer_hwstep() adjusts the volume by on each call. - The 'hw.snd.hwvol_mixer' sysctl specifies the mixer device to adjust the volume on for both functions. The values used correspond to the SOUNDCARD_MIXER_* constants.
* update code dealing with snd_dbuf objects to do so using a functional interfacecg2000-12-231-2/+2
| | | | | | | | | | | | | | | modify chn_setblocksize() to pick a default soft-blocksize appropriate to the sample rate and format in use. it will aim for a power of two size small enough to generate block sizes of at most 20ms. it will also set the hard-blocksize taking into account rate/format conversions in use. update drivers to implement setblocksize correctly: updated, tested: sb16, emu10k1, maestro, solo updated, untested: ad1816, ess, mss, sb8, csa not updated: ds1, es137x, fm801, neomagic, t4dwave, via82c686 i lack hardware to test: ad1816, csa, fm801, neomagic others will be updated/tested in the next few days.
* kobjify.cg2000-12-181-108/+141
| | | | | | | | | | this gives us several benefits, including: * easier extensibility- new optional methods can be added to ac97/mixer/channel classes without having to fixup every driver. * forward compatibility for drivers, provided no new mandatory methods are added.
* add reinit functions to mixerscg2000-10-261-6/+13
| | | | | unstaticize chn_start() add reset/resetdone functions to channels
* Fix warnings by moving static functions before they are used.peter2000-09-031-39/+39
|
* add a missing return statement, doh.cg2000-09-021-0/+1
|
* change mixer api slightlycg2000-09-011-6/+35
| | | | | | | | | change channel interface - kobj implementation coming soonish make pcm_makelinks not panic if modular add pcm_unregister() these changes support newpcm kld unloading, but this is only implemented by ds1.c
* Finally merge newmidi.tanimura2000-07-111-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | (I had been busy for my own research activity until the last weekend) Supported devices: SB Midi Port (sbc + midi) SB OPL3 (sbc + midi) 16550 UART (midi, needs a trick in your hint) CS461x Midi Port (csa + midi) OSS-compatible sequencer (seq) Supported playing software: playmidi (We definitely need more) Notes: /dev/midistat now reports installed midi drivers. /dev/sndstat reports only pcm drivers. We need the new name(pcmstat?). EMU8000(SB AWE) does not sound yet but does get probed so that the OPL3 synth on an AWE card works. TODO: MSS/PCI bridge drivers Midi-tty interface to support general serial devices Modules
* make mixer reads return the value written instead of the value setcg2000-06-191-1/+1
| | | | people seem to want this even though it breaks oss spec compliance
* add a function to reinitialize the mixer, to be called by drivers oncg2000-03-201-0/+13
| | | | resuming after suspend
* repo-copied to make way for newmidi, this commit updates include pathscg1999-11-201-1/+1
|
* set default ogain to 50 since some sb cards produce no sound at 0cg1999-11-151-0/+1
|
* $Id$ -> $FreeBSD$peter1999-09-011-1/+1
|
* say hello to newpcm. it is not yet enabled, requiring new pnp code from dfrcg1999-09-011-0/+202
to compile successfully. further details will be provided in the commit enabling newpcm.
OpenPOWER on IntegriCloud