aboutsummaryrefslogtreecommitdiffstats
path: root/src/mixer/alsa_mixer.c (follow)
Commit message (Collapse)AuthorAgeFilesLines
* alsa_mixer: initialize "volume_set" in the open() methodMax Kellermann2009-03-261-2/+2
| | | | | | "volume_set" is an attribute which becomes undefined when the mixer is closed. That means, it must be initialized each time the mixer is opened.
* alsa_mixer: removed superfluous checksMax Kellermann2009-03-261-10/+6
| | | | | | The MPD core guarantees that methods are always invoked in a consistent state. This means we can remove lots of checks from the volume methods.
* alsa_mixer: pass default device to config_get_block_string()Max Kellermann2009-03-261-14/+7
| | | | | Instead of replacing NULL with the default device in the open() method, pass the default device to config_get_block_string().
* alsa_mixer: make "device" and "control" constMax Kellermann2009-03-261-6/+5
| | | | Use config_get_block_string() instead of config_dup_block_string().
* mixer_control: close mixer on failureMax Kellermann2009-03-261-3/+0
| | | | | When getting or setting the volume fails, the MPD core close the mixer. Moved the duplicated code from the mixer plugins.
* mixer: added flag "open"Max Kellermann2009-03-261-0/+1
| | | | | | | | | | | | Remember if a mixer object is open or closed. Don't call open() again if it is already open. This guarantees that the mixer plugin is always called in a consistent state, and we will be able to remove lots of checks from the implementations. To support mixers which are automatically opened even if the audio output is still closed (to set the volume before playback starts), this patch also adds the "global" flag to the mixer_plugin struct. Both ALSA and OSS set this flag, while PULSE does not.
* all: Update copyright header.Avuton Olrich2009-03-131-3/+4
| | | | | | | | This updates the copyright header to all be the same, which is pretty much an update of where to mail request for a copy of the GPL and the years of the MPD project. This also puts all committers under 'The Music Player Project' umbrella. These entries should go individually in the AUTHORS file, for consistancy.
* mixer_api: replaced method "control()" with "{get,set}_volume()"Max Kellermann2009-02-161-71/+73
| | | | | The method control() is too complicated, and overengineered. Replace it with two trivial functions: get_volume() and set_volume().
* mixer_api: removed struct mixer_dataMax Kellermann2009-01-251-7/+12
| | | | | The mixer plugins should re-use the mixer struct and incorporate it in their object class.
* mixer: merged methods "init" and "configure"Max Kellermann2009-01-251-23/+6
| | | | | | | Both methods are always called together. There is no point in having them separate. This simplifies the code, because the old configure() method could be called more than once, and had to free old allocations.
* mixer: removed mixer_configure_legacy(), AC_MIXER_CONFIGUREMax Kellermann2009-01-251-5/+0
| | | | Those have been superseded by the new legacy configuration code.
* mixer: make all mixer_plugin pointers constMax Kellermann2009-01-251-1/+1
| | | | The plugin structures must never be modified.
* mixer: added missing copyright headersMax Kellermann2009-01-251-0/+17
|
* conf: allow param==NULLMax Kellermann2009-01-251-3/+0
| | | | | | | | Return the default value in the conf_get_block_*() functions when param==NULL was passed. This simplifies a lot of code, because all initialization can be done in one code path, regardless whether configuration is present.
* conf: const pointers in block get functionsMax Kellermann2009-01-251-2/+2
| | | | | All config_get_block_*() functions should accept constant config_param pointers.
* conf: added config_get_block_string()Max Kellermann2009-01-181-5/+8
| | | | This replaces lots of getBlockParam() invocations.
* mixer: don't check for NULL before g_free()Max Kellermann2009-01-181-8/+5
| | | | | The g_free() function includes a NULL check. We don't have to do it twice.
* conf: no CamelCase, part IMax Kellermann2009-01-171-3/+3
| | | | Renamed functions, types, variables.
* mixer: check param==NULL in the alsa and oss mixer codeMax Kellermann2009-01-161-0/+3
| | | | | | When MPD starts without audio output configuration, the "param" variable is NULL. This triggers a segmentation fault in both mixer plugins.
* removing mixer_reconfigure memmory leak, fixing configure of alsa and oss ↵Viliam Mateicka2009-01-111-4/+14
| | | | mixer (passing parameters)
* Introducing mixer apiViliam Mateicka2009-01-101-23/+37
| | | | | This patch tryes to introduce pluggable mixer (struct mixer_plugin) along with some basic infrastructure (mixer_* functions). Instance of mixer (struct mixer) is used in alsa and oss output plugin
* renaming mixer.h to mixer_api.hViliam Mateicka2009-01-041-1/+1
|
* mixer: renamed mix_* options to mixer_*Max Kellermann2009-01-011-2/+2
| | | | There is no reason to use the shortcut "mix" instead of "mixer".
* Moving mixers to audio outputsViliam Mateicka2008-12-311-0/+206