mirror of
https://github.com/alsa-project/alsa-lib.git
synced 2025-10-29 05:40:25 -04:00
Renamed simple_* to ordinary_* (name clash for simple mixer)
This commit is contained in:
parent
7c72da4ae5
commit
4771213631
11 changed files with 284 additions and 284 deletions
|
|
@ -161,8 +161,8 @@ esac
|
||||||
|
|
||||||
AC_OUTPUT(Makefile doc/Makefile doc/pictures/Makefile include/Makefile
|
AC_OUTPUT(Makefile doc/Makefile doc/pictures/Makefile include/Makefile
|
||||||
include/sound/Makefile src/Makefile \
|
include/sound/Makefile src/Makefile \
|
||||||
src/control/Makefile src/mixer/Makefile src/simple_mixer/Makefile \
|
src/control/Makefile src/mixer/Makefile src/ordinary_mixer/Makefile \
|
||||||
src/pcm/Makefile src/pcm/ext/Makefile src/pcm/scopes/Makefile src/simple_pcm/Makefile \
|
src/pcm/Makefile src/pcm/ext/Makefile src/pcm/scopes/Makefile src/ordinary_pcm/Makefile \
|
||||||
src/rawmidi/Makefile src/timer/Makefile \
|
src/rawmidi/Makefile src/timer/Makefile \
|
||||||
src/hwdep/Makefile src/seq/Makefile src/instr/Makefile \
|
src/hwdep/Makefile src/seq/Makefile src/instr/Makefile \
|
||||||
src/compat/Makefile src/conf/Makefile \
|
src/compat/Makefile src/conf/Makefile \
|
||||||
|
|
|
||||||
|
|
@ -9,7 +9,7 @@ alsainclude_HEADERS = asoundlib.h asoundef.h \
|
||||||
hwdep.h control.h mixer.h \
|
hwdep.h control.h mixer.h \
|
||||||
seq_event.h seq.h seqmid.h seq_midi_event.h \
|
seq_event.h seq.h seqmid.h seq_midi_event.h \
|
||||||
conv.h instr.h iatomic.h \
|
conv.h instr.h iatomic.h \
|
||||||
pcm_simple.h mixer_simple.h
|
pcm_ordinary.h mixer_ordinary.h
|
||||||
|
|
||||||
noinst_HEADERS = sys.h search.h list.h aserver.h local.h alsa-symbols.h
|
noinst_HEADERS = sys.h search.h list.h aserver.h local.h alsa-symbols.h
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,11 +1,11 @@
|
||||||
/**
|
/**
|
||||||
* \file <alsa/mixer_simple.h>
|
* \file <alsa/mixer_ordinary.h>
|
||||||
* \brief Application interface library for the ALSA driver
|
* \brief Application interface library for the ALSA driver
|
||||||
* \author Jaroslav Kysela <perex@suse.cz>
|
* \author Jaroslav Kysela <perex@suse.cz>
|
||||||
* \date 2003
|
* \date 2003
|
||||||
*
|
*
|
||||||
* Application interface library for the ALSA driver.
|
* Application interface library for the ALSA driver.
|
||||||
* See the \ref mixer_simple page for more details.
|
* See the \ref mixer_ordinary page for more details.
|
||||||
*
|
*
|
||||||
*
|
*
|
||||||
* This library is free software; you can redistribute it and/or modify
|
* This library is free software; you can redistribute it and/or modify
|
||||||
|
|
@ -29,91 +29,91 @@
|
||||||
|
|
||||||
#include <alsa/asoundlib.h>
|
#include <alsa/asoundlib.h>
|
||||||
|
|
||||||
/** Simple Mixer latency type */
|
/** Ordinary Mixer latency type */
|
||||||
enum snds_mixer_io_type {
|
enum sndo_mixer_io_type {
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* playback section
|
* playback section
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/** master volume - left (0-1000) */
|
/** master volume - left (0-1000) */
|
||||||
SNDS_MIO_MASTER_LVOL = 0,
|
SNDO_MIO_MASTER_LVOL = 0,
|
||||||
/** master volume - right (0-1000) */
|
/** master volume - right (0-1000) */
|
||||||
SNDS_MIO_MASTER_RVOL,
|
SNDO_MIO_MASTER_RVOL,
|
||||||
/** master volume - left mute (0 = off, 1 = on) */
|
/** master volume - left mute (0 = off, 1 = on) */
|
||||||
SNDS_MIO_MASTER_LMUTE,
|
SNDO_MIO_MASTER_LMUTE,
|
||||||
/** master volume - right mute (0 = off, 1 = on) */
|
/** master volume - right mute (0 = off, 1 = on) */
|
||||||
SNDS_MIO_MASTER_RMUTE,
|
SNDO_MIO_MASTER_RMUTE,
|
||||||
|
|
||||||
/** pcm volume - left (0-1000) */
|
/** pcm volume - left (0-1000) */
|
||||||
SNDS_MIO_Mixer_LVOL,
|
SNDO_MIO_Mixer_LVOL,
|
||||||
/** pcm volume - right (0-1000) */
|
/** pcm volume - right (0-1000) */
|
||||||
SNDS_MIO_Mixer_RVOL,
|
SNDO_MIO_Mixer_RVOL,
|
||||||
/** pcm volume - left mute (0 = off, 1 = on) */
|
/** pcm volume - left mute (0 = off, 1 = on) */
|
||||||
SNDS_MIO_Mixer_LMUTE,
|
SNDO_MIO_Mixer_LMUTE,
|
||||||
/** pcm volume - right mute (0 = off, 1 = on) */
|
/** pcm volume - right mute (0 = off, 1 = on) */
|
||||||
SNDS_MIO_Mixer_RMUTE,
|
SNDO_MIO_Mixer_RMUTE,
|
||||||
|
|
||||||
/** CD volume - left (0-1000) */
|
/** CD volume - left (0-1000) */
|
||||||
SNDS_MIO_CD_LVOL,
|
SNDO_MIO_CD_LVOL,
|
||||||
/** CD volume - right (0-1000) */
|
/** CD volume - right (0-1000) */
|
||||||
SNDS_MIO_CD_RVOL,
|
SNDO_MIO_CD_RVOL,
|
||||||
/** CD volume - left mute (0 = off, 1 = on) */
|
/** CD volume - left mute (0 = off, 1 = on) */
|
||||||
SNDS_MIO_CD_LMUTE,
|
SNDO_MIO_CD_LMUTE,
|
||||||
/** CD volume - right mute (0 = off, 1 = on) */
|
/** CD volume - right mute (0 = off, 1 = on) */
|
||||||
SNDS_MIO_CD_RMUTE,
|
SNDO_MIO_CD_RMUTE,
|
||||||
|
|
||||||
/** AUX volume - left (0-1000) */
|
/** AUX volume - left (0-1000) */
|
||||||
SNDS_MIO_AUX_LVOL,
|
SNDO_MIO_AUX_LVOL,
|
||||||
/** CD volume - right (0-1000) */
|
/** CD volume - right (0-1000) */
|
||||||
SNDS_MIO_AUX_RVOL,
|
SNDO_MIO_AUX_RVOL,
|
||||||
/** CD volume - left mute (0 = off, 1 = on) */
|
/** CD volume - left mute (0 = off, 1 = on) */
|
||||||
SNDS_MIO_AUX_LMUTE,
|
SNDO_MIO_AUX_LMUTE,
|
||||||
/** CD volume - right mute (0 = off, 1 = on) */
|
/** CD volume - right mute (0 = off, 1 = on) */
|
||||||
SNDS_MIO_AUX_RMUTE,
|
SNDO_MIO_AUX_RMUTE,
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* capture section
|
* capture section
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/** capture gain - left (0-1000) */
|
/** capture gain - left (0-1000) */
|
||||||
SNDS_MIO_CGAIN_LVOL = 0x1000,
|
SNDO_MIO_CGAIN_LVOL = 0x1000,
|
||||||
/** capture gain - right (0-1000) */
|
/** capture gain - right (0-1000) */
|
||||||
SNDS_MIO_CGAIN_RVOL,
|
SNDO_MIO_CGAIN_RVOL,
|
||||||
|
|
||||||
|
|
||||||
/** capture source - mic switch (0 = off, 1 = on) */
|
/** capture source - mic switch (0 = off, 1 = on) */
|
||||||
SNDS_MIO_CSOURCE_MIC = 0x1100,
|
SNDO_MIO_CSOURCE_MIC = 0x1100,
|
||||||
/** capture source - line switch (0 = off, 1 = on)*/
|
/** capture source - line switch (0 = off, 1 = on)*/
|
||||||
SNDS_MIO_CSOURCE_LINE,
|
SNDO_MIO_CSOURCE_LINE,
|
||||||
/** capture source - CD switch (0 = off, 1 = on) */
|
/** capture source - CD switch (0 = off, 1 = on) */
|
||||||
SNDS_MIO_CSOURCE_CD,
|
SNDO_MIO_CSOURCE_CD,
|
||||||
/** capture source - AUX switch (0 = off, 1 = on) */
|
/** capture source - AUX switch (0 = off, 1 = on) */
|
||||||
SNDS_MIO_CSOURCE_AUX,
|
SNDO_MIO_CSOURCE_AUX,
|
||||||
/** capture source - mix switch (0 = off, 1 = on) */
|
/** capture source - mix switch (0 = off, 1 = on) */
|
||||||
SNDS_MIO_CSOURCE_MIX
|
SNDO_MIO_CSOURCE_MIX
|
||||||
};
|
};
|
||||||
|
|
||||||
typedef struct snds_mixer snds_mixer_t;
|
typedef struct sndo_mixer sndo_mixer_t;
|
||||||
|
|
||||||
#ifdef __cplusplus
|
#ifdef __cplusplus
|
||||||
extern "C" {
|
extern "C" {
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* \defgroup Mixer_simple Mixer Simple Interface
|
* \defgroup Mixer_ordinary Mixer Ordinary Interface
|
||||||
* See the \ref mixer_simple page for more details.
|
* See the \ref mixer_ordinary page for more details.
|
||||||
* \{
|
* \{
|
||||||
*/
|
*/
|
||||||
|
|
||||||
int snds_mixer_open(snds_mixer_t **pmixer, const char *playback_name, const char *capture_name, snd_config_t *lconf);
|
int sndo_mixer_open(sndo_mixer_t **pmixer, const char *playback_name, const char *capture_name, snd_config_t *lconf);
|
||||||
int snds_mixer_close(snds_mixer_t *mixer);
|
int sndo_mixer_close(sndo_mixer_t *mixer);
|
||||||
int snds_mixer_poll_descriptors_count(snds_mixer_t *mixer);
|
int sndo_mixer_poll_descriptors_count(sndo_mixer_t *mixer);
|
||||||
int snds_mixer_poll_descriptors(snds_mixer_t *mixer, struct pollfd *pfds, unsigned int space);
|
int sndo_mixer_poll_descriptors(sndo_mixer_t *mixer, struct pollfd *pfds, unsigned int space);
|
||||||
int snds_mixer_poll_descriptors_revents(snds_mixer_t *mixer, struct pollfd *pfds, unsigned int nfds, unsigned short *revents);
|
int sndo_mixer_poll_descriptors_revents(sndo_mixer_t *mixer, struct pollfd *pfds, unsigned int nfds, unsigned short *revents);
|
||||||
int snds_mixer_io_get(snds_mixer_t *mixer, enum snds_mixer_io_type type, int *val);
|
int sndo_mixer_io_get(sndo_mixer_t *mixer, enum sndo_mixer_io_type type, int *val);
|
||||||
int snds_mixer_io_set(snds_mixer_t *mixer, enum snds_mixer_io_type type, int val);
|
int sndo_mixer_io_set(sndo_mixer_t *mixer, enum sndo_mixer_io_type type, int val);
|
||||||
int snds_mixer_io_change(snds_mixer_t *mixer, enum snds_mixer_io_type *changed, int changed_array_size);
|
int sndo_mixer_io_change(sndo_mixer_t *mixer, enum sndo_mixer_io_type *changed, int changed_array_size);
|
||||||
|
|
||||||
/** \} */
|
/** \} */
|
||||||
|
|
||||||
127
include/pcm_ordinary.h
Normal file
127
include/pcm_ordinary.h
Normal file
|
|
@ -0,0 +1,127 @@
|
||||||
|
/**
|
||||||
|
* \file <alsa/pcm_ordinary.h>
|
||||||
|
* \brief Application interface library for the ALSA driver
|
||||||
|
* \author Jaroslav Kysela <perex@suse.cz>
|
||||||
|
* \date 2003
|
||||||
|
*
|
||||||
|
* Application interface library for the ALSA driver.
|
||||||
|
* See the \ref pcm_ordinary page for more details.
|
||||||
|
*
|
||||||
|
*
|
||||||
|
* This library is free software; you can redistribute it and/or modify
|
||||||
|
* it under the terms of the GNU Lesser General Public License as
|
||||||
|
* published by the Free Software Foundation; either version 2.1 of
|
||||||
|
* the License, or (at your option) any later version.
|
||||||
|
*
|
||||||
|
* This program is distributed in the hope that it will be useful,
|
||||||
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
* GNU Lesser General Public License for more details.
|
||||||
|
*
|
||||||
|
* You should have received a copy of the GNU Lesser General Public
|
||||||
|
* License along with this library; if not, write to the Free Software
|
||||||
|
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
|
||||||
|
#ifndef __ALSA_PCM_SIMPLE_H
|
||||||
|
#define __ALSA_PCM_SIMPLE_H
|
||||||
|
|
||||||
|
#include <alsa/asoundlib.h>
|
||||||
|
|
||||||
|
/** Ordinary PCM latency type */
|
||||||
|
enum sndo_pcm_latency_type {
|
||||||
|
/** normal latency - for standard playback or capture
|
||||||
|
(estimated latency in one direction 350ms) (default) */
|
||||||
|
SNDO_PCM_LATENCY_NORMAL = 0,
|
||||||
|
/** medium latency - software phones etc.
|
||||||
|
(estimated latency in one direction 50ms) */
|
||||||
|
SNDO_PCM_LATENCY_MEDIUM,
|
||||||
|
/** realtime latency - realtime applications (effect processors etc.)
|
||||||
|
(estimated latency in one direction 5ms) */
|
||||||
|
SNDO_PCM_LATENCY_REALTIME
|
||||||
|
};
|
||||||
|
|
||||||
|
/** Ordinary PCM access type */
|
||||||
|
enum sndo_pcm_access_type {
|
||||||
|
/** interleaved access - channels are interleaved without any gaps among samples (default) */
|
||||||
|
SNDO_PCM_ACCESS_INTERLEAVED = 0,
|
||||||
|
/** noninterleaved access - channels are separate without any gaps among samples */
|
||||||
|
SNDO_PCM_ACCESS_NONINTERLEAVED
|
||||||
|
};
|
||||||
|
|
||||||
|
/** Ordinary PCM xrun type */
|
||||||
|
enum sndo_pcm_xrun_type {
|
||||||
|
/** driver / library will ignore all xruns, the stream runs forever (default) */
|
||||||
|
SNDO_PCM_XRUN_IGNORE = 0,
|
||||||
|
/** driver / library stops the stream when an xrun occurs */
|
||||||
|
SNDO_PCM_XRUN_STOP
|
||||||
|
};
|
||||||
|
|
||||||
|
typedef struct sndo_pcm sndo_pcm_t;
|
||||||
|
|
||||||
|
#ifdef __cplusplus
|
||||||
|
extern "C" {
|
||||||
|
#endif
|
||||||
|
|
||||||
|
/**
|
||||||
|
* \defgroup PCM_ordinary PCM Ordinary Interface
|
||||||
|
* See the \ref pcm_ordinary page for more details.
|
||||||
|
* \{
|
||||||
|
*/
|
||||||
|
|
||||||
|
int sndo_pcm_open(sndo_pcm_t **pcm, const char *playback_name, const char *capture_name, snd_config_t *lconf);
|
||||||
|
int sndo_pcm_close(sndo_pcm_t *pcm);
|
||||||
|
int sndo_pcm_poll_descriptors_count(sndo_pcm_t *pcm);
|
||||||
|
int sndo_pcm_poll_descriptors(sndo_pcm_t *pcm, struct pollfd *pfds, unsigned int space);
|
||||||
|
int sndo_pcm_poll_descriptors_revents(sndo_pcm_t *pcm, struct pollfd *pfds, unsigned int nfds, unsigned short *revents);
|
||||||
|
int sndo_pcm_start(sndo_pcm_t *pcm);
|
||||||
|
int sndo_pcm_drop(sndo_pcm_t *pcm);
|
||||||
|
int sndo_pcm_drain(sndo_pcm_t *pcm);
|
||||||
|
int sndo_pcm_delay(sndo_pcm_t *pcm, snd_pcm_sframes_t *delayp);
|
||||||
|
int sndo_pcm_resume(sndo_pcm_t *pcm);
|
||||||
|
int sndo_pcm_wait(sndo_pcm_t *pcm, int timeout);
|
||||||
|
snd_pcm_t *sndo_pcm_raw_playback(sndo_pcm_t *pcm);
|
||||||
|
snd_pcm_t *sndo_pcm_raw_capture(sndo_pcm_t *pcm);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* \defgroup PCM_ordinary_params Parameters Functions
|
||||||
|
* \ingroup PCM_ordinary
|
||||||
|
* See the \ref pcm_ordinary page for more details.
|
||||||
|
* \{
|
||||||
|
*/
|
||||||
|
|
||||||
|
int sndo_pcm_param_rate(sndo_pcm_t *pcm, unsigned int rate, unsigned int *used_rate);
|
||||||
|
int sndo_pcm_param_channels(sndo_pcm_t *pcm, unsigned int channels, unsigned int *used_channels);
|
||||||
|
int sndo_pcm_param_format(sndo_pcm_t *pcm, snd_pcm_format_t format, snd_pcm_subformat_t subformat);
|
||||||
|
int sndo_pcm_param_latency(sndo_pcm_t *pcm, enum sndo_pcm_latency_type latency);
|
||||||
|
int sndo_pcm_param_access(sndo_pcm_t *pcm, enum sndo_pcm_access_type access);
|
||||||
|
int sndo_pcm_param_xrun(sndo_pcm_t *pcm, enum sndo_pcm_xrun_type xrun);
|
||||||
|
|
||||||
|
/** \} */
|
||||||
|
|
||||||
|
/**
|
||||||
|
* \defgroup PCM_ordinary_access Ring Buffer I/O Functions
|
||||||
|
* \ingroup PCM_ordinary
|
||||||
|
* See the \ref pcm_ordinary page for more details.
|
||||||
|
* \{
|
||||||
|
*/
|
||||||
|
|
||||||
|
/* playback */
|
||||||
|
int sndo_pcm_pio_ibegin(sndo_pcm_t *pcm, void *ring_buffer, snd_pcm_uframes_t *frames);
|
||||||
|
int sndo_pcm_pio_iend(sndo_pcm_t *pcm, snd_pcm_uframes_t frames);
|
||||||
|
int sndo_pcm_pio_nbegin(sndo_pcm_t *pcm, void **ring_buffer, snd_pcm_uframes_t *frames);
|
||||||
|
int sndo_pcm_pio_nend(sndo_pcm_t *pcm, snd_pcm_uframes_t frames);
|
||||||
|
/* capture */
|
||||||
|
int sndo_pcm_cio_ibegin(sndo_pcm_t *pcm, void *ring_buffer, snd_pcm_uframes_t *frames);
|
||||||
|
int sndo_pcm_cio_iend(sndo_pcm_t *pcm, snd_pcm_uframes_t frames);
|
||||||
|
int sndo_pcm_cio_nbegin(sndo_pcm_t *pcm, void **ring_buffer, snd_pcm_uframes_t *frames);
|
||||||
|
int sndo_pcm_cio_nend(sndo_pcm_t *pcm, snd_pcm_uframes_t frames);
|
||||||
|
|
||||||
|
/** \} */
|
||||||
|
|
||||||
|
#ifdef __cplusplus
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#endif /* __ALSA_PCM_SIMPLE_H */
|
||||||
|
|
@ -1,127 +0,0 @@
|
||||||
/**
|
|
||||||
* \file <alsa/pcm_simple.h>
|
|
||||||
* \brief Application interface library for the ALSA driver
|
|
||||||
* \author Jaroslav Kysela <perex@suse.cz>
|
|
||||||
* \date 2003
|
|
||||||
*
|
|
||||||
* Application interface library for the ALSA driver.
|
|
||||||
* See the \ref pcm_simple page for more details.
|
|
||||||
*
|
|
||||||
*
|
|
||||||
* This library is free software; you can redistribute it and/or modify
|
|
||||||
* it under the terms of the GNU Lesser General Public License as
|
|
||||||
* published by the Free Software Foundation; either version 2.1 of
|
|
||||||
* the License, or (at your option) any later version.
|
|
||||||
*
|
|
||||||
* This program is distributed in the hope that it will be useful,
|
|
||||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
||||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
||||||
* GNU Lesser General Public License for more details.
|
|
||||||
*
|
|
||||||
* You should have received a copy of the GNU Lesser General Public
|
|
||||||
* License along with this library; if not, write to the Free Software
|
|
||||||
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
|
||||||
*
|
|
||||||
*/
|
|
||||||
|
|
||||||
#ifndef __ALSA_PCM_SIMPLE_H
|
|
||||||
#define __ALSA_PCM_SIMPLE_H
|
|
||||||
|
|
||||||
#include <alsa/asoundlib.h>
|
|
||||||
|
|
||||||
/** Simple PCM latency type */
|
|
||||||
enum snds_pcm_latency_type {
|
|
||||||
/** normal latency - for standard playback or capture
|
|
||||||
(estimated latency in one direction 350ms) (default) */
|
|
||||||
SNDS_PCM_LATENCY_NORMAL = 0,
|
|
||||||
/** medium latency - software phones etc.
|
|
||||||
(estimated latency in one direction 50ms) */
|
|
||||||
SNDS_PCM_LATENCY_MEDIUM,
|
|
||||||
/** realtime latency - realtime applications (effect processors etc.)
|
|
||||||
(estimated latency in one direction 5ms) */
|
|
||||||
SNDS_PCM_LATENCY_REALTIME
|
|
||||||
};
|
|
||||||
|
|
||||||
/** Simple PCM access type */
|
|
||||||
enum snds_pcm_access_type {
|
|
||||||
/** interleaved access - channels are interleaved without any gaps among samples (default) */
|
|
||||||
SNDS_PCM_ACCESS_INTERLEAVED = 0,
|
|
||||||
/** noninterleaved access - channels are separate without any gaps among samples */
|
|
||||||
SNDS_PCM_ACCESS_NONINTERLEAVED
|
|
||||||
};
|
|
||||||
|
|
||||||
/** Simple PCM xrun type */
|
|
||||||
enum snds_pcm_xrun_type {
|
|
||||||
/** driver / library will ignore all xruns, the stream runs forever (default) */
|
|
||||||
SNDS_PCM_XRUN_IGNORE = 0,
|
|
||||||
/** driver / library stops the stream when an xrun occurs */
|
|
||||||
SNDS_PCM_XRUN_STOP
|
|
||||||
};
|
|
||||||
|
|
||||||
typedef struct snds_pcm snds_pcm_t;
|
|
||||||
|
|
||||||
#ifdef __cplusplus
|
|
||||||
extern "C" {
|
|
||||||
#endif
|
|
||||||
|
|
||||||
/**
|
|
||||||
* \defgroup PCM_simple PCM Simple Interface
|
|
||||||
* See the \ref pcm_simple page for more details.
|
|
||||||
* \{
|
|
||||||
*/
|
|
||||||
|
|
||||||
int snds_pcm_open(snds_pcm_t **pcm, const char *playback_name, const char *capture_name, snd_config_t *lconf);
|
|
||||||
int snds_pcm_close(snds_pcm_t *pcm);
|
|
||||||
int snds_pcm_poll_descriptors_count(snds_pcm_t *pcm);
|
|
||||||
int snds_pcm_poll_descriptors(snds_pcm_t *pcm, struct pollfd *pfds, unsigned int space);
|
|
||||||
int snds_pcm_poll_descriptors_revents(snds_pcm_t *pcm, struct pollfd *pfds, unsigned int nfds, unsigned short *revents);
|
|
||||||
int snds_pcm_start(snds_pcm_t *pcm);
|
|
||||||
int snds_pcm_drop(snds_pcm_t *pcm);
|
|
||||||
int snds_pcm_drain(snds_pcm_t *pcm);
|
|
||||||
int snds_pcm_delay(snds_pcm_t *pcm, snd_pcm_sframes_t *delayp);
|
|
||||||
int snds_pcm_resume(snds_pcm_t *pcm);
|
|
||||||
int snds_pcm_wait(snds_pcm_t *pcm, int timeout);
|
|
||||||
snd_pcm_t *snds_pcm_raw_playback(snds_pcm_t *pcm);
|
|
||||||
snd_pcm_t *snds_pcm_raw_capture(snds_pcm_t *pcm);
|
|
||||||
|
|
||||||
/**
|
|
||||||
* \defgroup PCM_simple_params Parameters Functions
|
|
||||||
* \ingroup PCM_simple
|
|
||||||
* See the \ref pcm_simple page for more details.
|
|
||||||
* \{
|
|
||||||
*/
|
|
||||||
|
|
||||||
int snds_pcm_param_rate(snds_pcm_t *pcm, unsigned int rate, unsigned int *used_rate);
|
|
||||||
int snds_pcm_param_channels(snds_pcm_t *pcm, unsigned int channels, unsigned int *used_channels);
|
|
||||||
int snds_pcm_param_format(snds_pcm_t *pcm, snd_pcm_format_t format, snd_pcm_subformat_t subformat);
|
|
||||||
int snds_pcm_param_latency(snds_pcm_t *pcm, enum snds_pcm_latency_type latency);
|
|
||||||
int snds_pcm_param_access(snds_pcm_t *pcm, enum snds_pcm_access_type access);
|
|
||||||
int snds_pcm_param_xrun(snds_pcm_t *pcm, enum snds_pcm_xrun_type xrun);
|
|
||||||
|
|
||||||
/** \} */
|
|
||||||
|
|
||||||
/**
|
|
||||||
* \defgroup PCM_simple_access Ring Buffer I/O Functions
|
|
||||||
* \ingroup PCM_simple
|
|
||||||
* See the \ref pcm_simple page for more details.
|
|
||||||
* \{
|
|
||||||
*/
|
|
||||||
|
|
||||||
/* playback */
|
|
||||||
int snds_pcm_pio_ibegin(snds_pcm_t *pcm, void *ring_buffer, snd_pcm_uframes_t *frames);
|
|
||||||
int snds_pcm_pio_iend(snds_pcm_t *pcm, snd_pcm_uframes_t frames);
|
|
||||||
int snds_pcm_pio_nbegin(snds_pcm_t *pcm, void **ring_buffer, snd_pcm_uframes_t *frames);
|
|
||||||
int snds_pcm_pio_nend(snds_pcm_t *pcm, snd_pcm_uframes_t frames);
|
|
||||||
/* capture */
|
|
||||||
int snds_pcm_cio_ibegin(snds_pcm_t *pcm, void *ring_buffer, snd_pcm_uframes_t *frames);
|
|
||||||
int snds_pcm_cio_iend(snds_pcm_t *pcm, snd_pcm_uframes_t frames);
|
|
||||||
int snds_pcm_cio_nbegin(snds_pcm_t *pcm, void **ring_buffer, snd_pcm_uframes_t *frames);
|
|
||||||
int snds_pcm_cio_nend(snds_pcm_t *pcm, snd_pcm_uframes_t frames);
|
|
||||||
|
|
||||||
/** \} */
|
|
||||||
|
|
||||||
#ifdef __cplusplus
|
|
||||||
}
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#endif /* __ALSA_PCM_SIMPLE_H */
|
|
||||||
|
|
@ -1,4 +1,4 @@
|
||||||
SUBDIRS=control mixer simple_mixer pcm simple_pcm rawmidi timer hwdep seq instr compat conf
|
SUBDIRS=control mixer ordinary_mixer pcm ordinary_pcm rawmidi timer hwdep seq instr compat conf
|
||||||
EXTRA_DIST=Versions
|
EXTRA_DIST=Versions
|
||||||
COMPATNUM=@LIBTOOL_VERSION_INFO@
|
COMPATNUM=@LIBTOOL_VERSION_INFO@
|
||||||
|
|
||||||
|
|
@ -10,9 +10,9 @@ endif
|
||||||
|
|
||||||
lib_LTLIBRARIES = libasound.la
|
lib_LTLIBRARIES = libasound.la
|
||||||
libasound_la_SOURCES = conf.c confmisc.c input.c output.c async.c error.c dlmisc.c socket.c shmarea.c
|
libasound_la_SOURCES = conf.c confmisc.c input.c output.c async.c error.c dlmisc.c socket.c shmarea.c
|
||||||
libasound_la_LIBADD = control/libcontrol.la
|
libasound_la_LIBADD = control/libcontrol.la \
|
||||||
mixer/libmixer.la simple_mixer/libsimplemixer.la \
|
mixer/libmixer.la ordinary_mixer/libordinarymixer.la \
|
||||||
pcm/libpcm.la simple_pcm/libsimplepcm.la \
|
pcm/libpcm.la ordinary_pcm/libordinarypcm.la \
|
||||||
rawmidi/librawmidi.la timer/libtimer.la \
|
rawmidi/librawmidi.la timer/libtimer.la \
|
||||||
hwdep/libhwdep.la seq/libseq.la instr/libinstr.la \
|
hwdep/libhwdep.la seq/libseq.la instr/libinstr.la \
|
||||||
compat/libcompat.la -lm -ldl -lpthread
|
compat/libcompat.la -lm -ldl -lpthread
|
||||||
|
|
@ -26,14 +26,14 @@ control/libcontrol.la:
|
||||||
mixer/libmixer.la:
|
mixer/libmixer.la:
|
||||||
$(MAKE) -C mixer libmixer.la
|
$(MAKE) -C mixer libmixer.la
|
||||||
|
|
||||||
simple_mixer/libsimplemixer.la:
|
ordinary_mixer/libordinarymixer.la:
|
||||||
$(MAKE) -C simple_mixer libsimplemixer.la
|
$(MAKE) -C ordinary_mixer libordinarymixer.la
|
||||||
|
|
||||||
pcm/libpcm.la:
|
pcm/libpcm.la:
|
||||||
$(MAKE) -C pcm libpcm.la
|
$(MAKE) -C pcm libpcm.la
|
||||||
|
|
||||||
simple_pcm/libsimplepcm.la:
|
ordinary_pcm/libordinarypcm.la:
|
||||||
$(MAKE) -C simple_pcm libsimplepcm.la
|
$(MAKE) -C ordinary_pcm libordinarypcm.la
|
||||||
|
|
||||||
rawmidi/librawmidi.la:
|
rawmidi/librawmidi.la:
|
||||||
$(MAKE) -C rawmidi librawmidi.la
|
$(MAKE) -C rawmidi librawmidi.la
|
||||||
|
|
|
||||||
13
src/ordinary_mixer/Makefile.am
Normal file
13
src/ordinary_mixer/Makefile.am
Normal file
|
|
@ -0,0 +1,13 @@
|
||||||
|
SUBDIRS =
|
||||||
|
DIST_SUBDIRS =
|
||||||
|
|
||||||
|
EXTRA_LTLIBRARIES = libordinarymixer.la
|
||||||
|
|
||||||
|
libordinarymixer_la_SOURCES = ordinary_mixer.c
|
||||||
|
noinst_HEADERS =
|
||||||
|
|
||||||
|
alsadir = $(datadir)/alsa
|
||||||
|
|
||||||
|
all: libordinarymixer.la
|
||||||
|
|
||||||
|
INCLUDES=-I$(top_srcdir)/include
|
||||||
|
|
@ -1,17 +1,17 @@
|
||||||
/**
|
/**
|
||||||
* \file simple_mixer/simple_mixer.c
|
* \file ordinary_mixer/ordinary_mixer.c
|
||||||
* \ingroup Mixer_simple
|
* \ingroup Mixer_ordinary
|
||||||
* \brief Simple mixer interface
|
* \brief Ordinary mixer interface
|
||||||
* \author Jaroslav Kysela <perex@suse.cz>
|
* \author Jaroslav Kysela <perex@suse.cz>
|
||||||
* \date 2003
|
* \date 2003
|
||||||
*
|
*
|
||||||
* Simple mixer interface is a high level abtraction for soundcard's
|
* Ordinary mixer interface is a high level abtraction for soundcard's
|
||||||
* mixing.
|
* mixing.
|
||||||
*
|
*
|
||||||
* See the \ref Mixer_simple page for more details.
|
* See the \ref Mixer_ordinary page for more details.
|
||||||
*/
|
*/
|
||||||
/*
|
/*
|
||||||
* Simple Mixer Interface - main file
|
* Ordinary Mixer Interface - main file
|
||||||
* Copyright (c) 2003 by Jaroslav Kysela <perex@suse.cz>
|
* Copyright (c) 2003 by Jaroslav Kysela <perex@suse.cz>
|
||||||
*
|
*
|
||||||
* This library is free software; you can redistribute it and/or modify
|
* This library is free software; you can redistribute it and/or modify
|
||||||
|
|
@ -30,18 +30,18 @@
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/*! \page Mixer_simple Simple mixer interface
|
/*! \page Mixer_ordinary Ordinary mixer interface
|
||||||
|
|
||||||
<P>Write something here</P>
|
<P>Write something here</P>
|
||||||
|
|
||||||
\section Mixer_simple_overview
|
\section Mixer_ordinary_overview
|
||||||
|
|
||||||
Write something here
|
Write something here
|
||||||
|
|
||||||
*/
|
*/
|
||||||
/**
|
/**
|
||||||
* \example ../test/simple_mixer.c
|
* \example ../test/ordinary_mixer.c
|
||||||
* \anchor example_simple_mixer
|
* \anchor example_ordinary_mixer
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
|
|
@ -56,21 +56,21 @@ Write something here
|
||||||
#include <sys/mman.h>
|
#include <sys/mman.h>
|
||||||
#include <limits.h>
|
#include <limits.h>
|
||||||
#include "local.h"
|
#include "local.h"
|
||||||
#include "mixer_simple.h"
|
#include "mixer_ordinary.h"
|
||||||
|
|
||||||
struct snds_mixer {
|
struct sndo_mixer {
|
||||||
snd_mixer_t *mixer;
|
snd_mixer_t *mixer;
|
||||||
};
|
};
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* \brief Opens a simple mixer instance
|
* \brief Opens a ordinary mixer instance
|
||||||
* \param pmixer Returned simple mixer handle
|
* \param pmixer Returned ordinary mixer handle
|
||||||
* \param playback_name ASCII identifier of the simple mixer handle (playback controls)
|
* \param playback_name ASCII identifier of the ordinary mixer handle (playback controls)
|
||||||
* \param capture_name ASCII identifier of the simple mixer handle (capture controls)
|
* \param capture_name ASCII identifier of the ordinary mixer handle (capture controls)
|
||||||
* \param lconf Local configuration (might be NULL - use global configuration)
|
* \param lconf Local configuration (might be NULL - use global configuration)
|
||||||
* \return 0 on success otherwise a negative error code
|
* \return 0 on success otherwise a negative error code
|
||||||
*/
|
*/
|
||||||
int snds_mixer_open(snds_mixer_t **pmixer,
|
int sndo_mixer_open(sndo_mixer_t **pmixer,
|
||||||
const char *playback_name,
|
const char *playback_name,
|
||||||
const char *capture_name,
|
const char *capture_name,
|
||||||
snd_config_t *lconf)
|
snd_config_t *lconf)
|
||||||
|
|
@ -80,82 +80,82 @@ int snds_mixer_open(snds_mixer_t **pmixer,
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* \brief Closes a simple mixer instance
|
* \brief Closes a ordinary mixer instance
|
||||||
* \param mixer Simple mixer handle to close
|
* \param mixer Ordinary mixer handle to close
|
||||||
* \return 0 on success otherwise a negative error code
|
* \return 0 on success otherwise a negative error code
|
||||||
*/
|
*/
|
||||||
int snds_mixer_close(snds_mixer_t *mixer)
|
int sndo_mixer_close(sndo_mixer_t *mixer)
|
||||||
{
|
{
|
||||||
return -ENODEV;
|
return -ENODEV;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* \brief get count of poll descriptors for simple mixer handle
|
* \brief get count of poll descriptors for ordinary mixer handle
|
||||||
* \param mixer simple mixer handle
|
* \param mixer ordinary mixer handle
|
||||||
* \return count of poll descriptors
|
* \return count of poll descriptors
|
||||||
*/
|
*/
|
||||||
int snds_mixer_poll_descriptors_count(snds_mixer_t *mixer)
|
int sndo_mixer_poll_descriptors_count(sndo_mixer_t *mixer)
|
||||||
{
|
{
|
||||||
return snd_mixer_poll_descriptors_count(mixer->mixer);
|
return snd_mixer_poll_descriptors_count(mixer->mixer);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* \brief get poll descriptors
|
* \brief get poll descriptors
|
||||||
* \param mixer simple mixer handle
|
* \param mixer ordinary mixer handle
|
||||||
* \param pfds array of poll descriptors
|
* \param pfds array of poll descriptors
|
||||||
* \param space space in the poll descriptor array
|
* \param space space in the poll descriptor array
|
||||||
* \return count of filled descriptors
|
* \return count of filled descriptors
|
||||||
*/
|
*/
|
||||||
int snds_mixer_poll_descriptors(snds_mixer_t *mixer, struct pollfd *pfds, unsigned int space)
|
int sndo_mixer_poll_descriptors(sndo_mixer_t *mixer, struct pollfd *pfds, unsigned int space)
|
||||||
{
|
{
|
||||||
return snd_mixer_poll_descriptors(mixer->mixer, pfds, space);
|
return snd_mixer_poll_descriptors(mixer->mixer, pfds, space);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* \brief get returned events from poll descriptors
|
* \brief get returned events from poll descriptors
|
||||||
* \param mixer simple mixer handle
|
* \param mixer ordinary mixer handle
|
||||||
* \param pfds array of poll descriptors
|
* \param pfds array of poll descriptors
|
||||||
* \param nfds count of poll descriptors
|
* \param nfds count of poll descriptors
|
||||||
* \param revents returned events
|
* \param revents returned events
|
||||||
* \return zero if success, otherwise a negative error code
|
* \return zero if success, otherwise a negative error code
|
||||||
*/
|
*/
|
||||||
int snds_mixer_poll_descriptors_revents(snds_mixer_t *mixer, struct pollfd *pfds, unsigned int nfds, unsigned short *revents)
|
int sndo_mixer_poll_descriptors_revents(sndo_mixer_t *mixer, struct pollfd *pfds, unsigned int nfds, unsigned short *revents)
|
||||||
{
|
{
|
||||||
return snd_mixer_poll_descriptors_revents(mixer->mixer, pfds, nfds, revents);
|
return snd_mixer_poll_descriptors_revents(mixer->mixer, pfds, nfds, revents);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* \brief get simple mixer io control value
|
* \brief get ordinary mixer io control value
|
||||||
* \param mixer simple mixer handle
|
* \param mixer ordinary mixer handle
|
||||||
* \param type io type
|
* \param type io type
|
||||||
* \param val returned value
|
* \param val returned value
|
||||||
* \return zero if success, otherwise a negative error code
|
* \return zero if success, otherwise a negative error code
|
||||||
*/
|
*/
|
||||||
int snds_mixer_io_get(snds_mixer_t *mixer, enum snds_mixer_io_type type, int *val)
|
int sndo_mixer_io_get(sndo_mixer_t *mixer, enum sndo_mixer_io_type type, int *val)
|
||||||
{
|
{
|
||||||
return -ENODEV;
|
return -ENODEV;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* \brief set simple mixer io control value
|
* \brief set ordinary mixer io control value
|
||||||
* \param mixer simple mixer handle
|
* \param mixer ordinary mixer handle
|
||||||
* \param type io type
|
* \param type io type
|
||||||
* \param val desired value
|
* \param val desired value
|
||||||
* \return zero if success, otherwise a negative error code
|
* \return zero if success, otherwise a negative error code
|
||||||
*/
|
*/
|
||||||
int snds_mixer_io_set(snds_mixer_t *mixer, enum snds_mixer_io_type type, int val)
|
int sndo_mixer_io_set(sndo_mixer_t *mixer, enum sndo_mixer_io_type type, int val)
|
||||||
{
|
{
|
||||||
return -ENODEV;
|
return -ENODEV;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* \brief get simple mixer io control change notification
|
* \brief get ordinary mixer io control change notification
|
||||||
* \param mixer simple mixer handle
|
* \param mixer ordinary mixer handle
|
||||||
* \param changed list of changed io types
|
* \param changed list of changed io types
|
||||||
* \param changed_array_size size of list of changed io types
|
* \param changed_array_size size of list of changed io types
|
||||||
* \return zero if success, otherwise a negative error code
|
* \return zero if success, otherwise a negative error code
|
||||||
*/
|
*/
|
||||||
int snds_mixer_io_change(snds_mixer_t *mixer, enum snds_mixer_io_type *changed, int changed_array_size)
|
int sndo_mixer_io_change(sndo_mixer_t *mixer, enum sndo_mixer_io_type *changed, int changed_array_size)
|
||||||
{
|
{
|
||||||
return -ENODEV;
|
return -ENODEV;
|
||||||
}
|
}
|
||||||
|
|
@ -1,13 +1,13 @@
|
||||||
SUBDIRS =
|
SUBDIRS =
|
||||||
DIST_SUBDIRS =
|
DIST_SUBDIRS =
|
||||||
|
|
||||||
EXTRA_LTLIBRARIES = libsimplepcm.la
|
EXTRA_LTLIBRARIES = libordinarypcm.la
|
||||||
|
|
||||||
libsimplepcm_la_SOURCES = simple_pcm.c
|
libordinarypcm_la_SOURCES = ordinary_pcm.c
|
||||||
noinst_HEADERS =
|
noinst_HEADERS =
|
||||||
|
|
||||||
alsadir = $(datadir)/alsa
|
alsadir = $(datadir)/alsa
|
||||||
|
|
||||||
all: libsimplepcm.la
|
all: libordinarypcm.la
|
||||||
|
|
||||||
INCLUDES=-I$(top_srcdir)/include
|
INCLUDES=-I$(top_srcdir)/include
|
||||||
|
|
@ -1,17 +1,17 @@
|
||||||
/**
|
/**
|
||||||
* \file simple_pcm/simple_pcm.c
|
* \file ordinary_pcm/ordinary_pcm.c
|
||||||
* \ingroup PCM_simple
|
* \ingroup PCM_ordinary
|
||||||
* \brief Simple PCM interface
|
* \brief Ordinary PCM interface
|
||||||
* \author Jaroslav Kysela <perex@suse.cz>
|
* \author Jaroslav Kysela <perex@suse.cz>
|
||||||
* \date 2003
|
* \date 2003
|
||||||
*
|
*
|
||||||
* Simple PCM interface is a high level abtraction for
|
* Ordinary PCM interface is a high level abtraction for
|
||||||
* digital audio streaming.
|
* digital audio streaming.
|
||||||
*
|
*
|
||||||
* See the \ref PCM_simple page for more details.
|
* See the \ref PCM_ordinary page for more details.
|
||||||
*/
|
*/
|
||||||
/*
|
/*
|
||||||
* Simple PCM Interface - main file
|
* Ordinary PCM Interface - main file
|
||||||
* Copyright (c) 2003 by Jaroslav Kysela <perex@suse.cz>
|
* Copyright (c) 2003 by Jaroslav Kysela <perex@suse.cz>
|
||||||
*
|
*
|
||||||
* This library is free software; you can redistribute it and/or modify
|
* This library is free software; you can redistribute it and/or modify
|
||||||
|
|
@ -30,18 +30,18 @@
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/*! \page PCM_simple Simple PCM interface
|
/*! \page PCM_ordinary Ordinary PCM interface
|
||||||
|
|
||||||
<P>Write something here</P>
|
<P>Write something here</P>
|
||||||
|
|
||||||
\section PCM_simple_overview
|
\section PCM_ordinary_overview
|
||||||
|
|
||||||
Write something here
|
Write something here
|
||||||
|
|
||||||
*/
|
*/
|
||||||
/**
|
/**
|
||||||
* \example ../test/simple_pcm.c
|
* \example ../test/ordinary_pcm.c
|
||||||
* \anchor example_simple_pcm
|
* \anchor example_ordinary_pcm
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
|
|
@ -56,23 +56,23 @@ Write something here
|
||||||
#include <sys/mman.h>
|
#include <sys/mman.h>
|
||||||
#include <limits.h>
|
#include <limits.h>
|
||||||
#include "local.h"
|
#include "local.h"
|
||||||
#include "pcm_simple.h"
|
#include "pcm_ordinary.h"
|
||||||
|
|
||||||
struct snds_pcm {
|
struct sndo_pcm {
|
||||||
snd_pcm_t *playback;
|
snd_pcm_t *playback;
|
||||||
snd_pcm_t *capture;
|
snd_pcm_t *capture;
|
||||||
snd_pcm_t *master;
|
snd_pcm_t *master;
|
||||||
};
|
};
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* \brief Opens a simple pcm instance
|
* \brief Opens a ordinary pcm instance
|
||||||
* \param ppcm Returned simple pcm handle
|
* \param ppcm Returned ordinary pcm handle
|
||||||
* \param playback_name ASCII identifier of the simple pcm handle (playback)
|
* \param playback_name ASCII identifier of the ordinary pcm handle (playback)
|
||||||
* \param capture_name ASCII identifier of the simple pcm handle (capture)
|
* \param capture_name ASCII identifier of the ordinary pcm handle (capture)
|
||||||
* \param lconf Local configuration (might be NULL - use global configuration)
|
* \param lconf Local configuration (might be NULL - use global configuration)
|
||||||
* \return 0 on success otherwise a negative error code
|
* \return 0 on success otherwise a negative error code
|
||||||
*/
|
*/
|
||||||
int snds_pcm_open(snds_pcm_t **ppcm,
|
int sndo_pcm_open(sndo_pcm_t **ppcm,
|
||||||
const char *playback_name,
|
const char *playback_name,
|
||||||
const char *capture_name,
|
const char *capture_name,
|
||||||
snd_config_t *lconf)
|
snd_config_t *lconf)
|
||||||
|
|
@ -82,21 +82,21 @@ int snds_pcm_open(snds_pcm_t **ppcm,
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* \brief Closes a simple pcm instance
|
* \brief Closes a ordinary pcm instance
|
||||||
* \param pcm Simple pcm handle to close
|
* \param pcm Ordinary pcm handle to close
|
||||||
* \return 0 on success otherwise a negative error code
|
* \return 0 on success otherwise a negative error code
|
||||||
*/
|
*/
|
||||||
int snds_pcm_close(snds_pcm_t *pcm)
|
int sndo_pcm_close(sndo_pcm_t *pcm)
|
||||||
{
|
{
|
||||||
return -ENODEV;
|
return -ENODEV;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* \brief get count of poll descriptors for simple pcm handle
|
* \brief get count of poll descriptors for ordinary pcm handle
|
||||||
* \param pcm simple pcm handle
|
* \param pcm ordinary pcm handle
|
||||||
* \return count of poll descriptors
|
* \return count of poll descriptors
|
||||||
*/
|
*/
|
||||||
int snds_pcm_poll_descriptors_count(snds_pcm_t *pcm)
|
int sndo_pcm_poll_descriptors_count(sndo_pcm_t *pcm)
|
||||||
{
|
{
|
||||||
int err, res = 0;
|
int err, res = 0;
|
||||||
|
|
||||||
|
|
@ -111,12 +111,12 @@ int snds_pcm_poll_descriptors_count(snds_pcm_t *pcm)
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* \brief get poll descriptors
|
* \brief get poll descriptors
|
||||||
* \param pcm simple pcm handle
|
* \param pcm ordinary pcm handle
|
||||||
* \param pfds array of poll descriptors
|
* \param pfds array of poll descriptors
|
||||||
* \param space space in the poll descriptor array
|
* \param space space in the poll descriptor array
|
||||||
* \return count of filled descriptors
|
* \return count of filled descriptors
|
||||||
*/
|
*/
|
||||||
int snds_pcm_poll_descriptors(snds_pcm_t *pcm, struct pollfd *pfds, unsigned int space)
|
int sndo_pcm_poll_descriptors(sndo_pcm_t *pcm, struct pollfd *pfds, unsigned int space)
|
||||||
{
|
{
|
||||||
int playback, err, res = 0;
|
int playback, err, res = 0;
|
||||||
|
|
||||||
|
|
@ -138,13 +138,13 @@ int snds_pcm_poll_descriptors(snds_pcm_t *pcm, struct pollfd *pfds, unsigned int
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* \brief get returned events from poll descriptors
|
* \brief get returned events from poll descriptors
|
||||||
* \param pcm simple pcm handle
|
* \param pcm ordinary pcm handle
|
||||||
* \param pfds array of poll descriptors
|
* \param pfds array of poll descriptors
|
||||||
* \param nfds count of poll descriptors
|
* \param nfds count of poll descriptors
|
||||||
* \param revents returned events
|
* \param revents returned events
|
||||||
* \return zero if success, otherwise a negative error code
|
* \return zero if success, otherwise a negative error code
|
||||||
*/
|
*/
|
||||||
int snds_pcm_poll_descriptors_revents(snds_pcm_t *pcm, struct pollfd *pfds, unsigned int nfds, unsigned short *revents)
|
int sndo_pcm_poll_descriptors_revents(sndo_pcm_t *pcm, struct pollfd *pfds, unsigned int nfds, unsigned short *revents)
|
||||||
{
|
{
|
||||||
int playback, err;
|
int playback, err;
|
||||||
unsigned short _revents;
|
unsigned short _revents;
|
||||||
|
|
@ -166,10 +166,10 @@ int snds_pcm_poll_descriptors_revents(snds_pcm_t *pcm, struct pollfd *pfds, unsi
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* \brief Start a PCM
|
* \brief Start a PCM
|
||||||
* \param pcm simple PCM handle
|
* \param pcm ordinary PCM handle
|
||||||
* \return 0 on success otherwise a negative error code
|
* \return 0 on success otherwise a negative error code
|
||||||
*/
|
*/
|
||||||
int snds_pcm_start(snds_pcm_t *pcm)
|
int sndo_pcm_start(sndo_pcm_t *pcm)
|
||||||
{
|
{
|
||||||
/* the streams are linked, so use only one stream */
|
/* the streams are linked, so use only one stream */
|
||||||
return snd_pcm_start(pcm->master);
|
return snd_pcm_start(pcm->master);
|
||||||
|
|
@ -177,10 +177,10 @@ int snds_pcm_start(snds_pcm_t *pcm)
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* \brief Stop a PCM dropping pending frames
|
* \brief Stop a PCM dropping pending frames
|
||||||
* \param pcm simple PCM handle
|
* \param pcm ordinary PCM handle
|
||||||
* \return 0 on success otherwise a negative error code
|
* \return 0 on success otherwise a negative error code
|
||||||
*/
|
*/
|
||||||
int snds_pcm_drop(snds_pcm_t *pcm)
|
int sndo_pcm_drop(sndo_pcm_t *pcm)
|
||||||
{
|
{
|
||||||
/* the streams are linked, so use only one stream */
|
/* the streams are linked, so use only one stream */
|
||||||
return snd_pcm_drop(pcm->master);
|
return snd_pcm_drop(pcm->master);
|
||||||
|
|
@ -196,7 +196,7 @@ int snds_pcm_drop(snds_pcm_t *pcm)
|
||||||
* the PCM.
|
* the PCM.
|
||||||
* For capture stop PCM permitting to retrieve residual frames.
|
* For capture stop PCM permitting to retrieve residual frames.
|
||||||
*/
|
*/
|
||||||
int snds_pcm_drain(snds_pcm_t *pcm)
|
int sndo_pcm_drain(sndo_pcm_t *pcm)
|
||||||
{
|
{
|
||||||
/* the streams are linked, so use only one stream */
|
/* the streams are linked, so use only one stream */
|
||||||
return snd_pcm_drain(pcm->master);
|
return snd_pcm_drain(pcm->master);
|
||||||
|
|
@ -204,7 +204,7 @@ int snds_pcm_drain(snds_pcm_t *pcm)
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* \brief Obtain delay for a running PCM handle
|
* \brief Obtain delay for a running PCM handle
|
||||||
* \param pcm simple PCM handle
|
* \param pcm ordinary PCM handle
|
||||||
* \param delayp Returned delay in frames
|
* \param delayp Returned delay in frames
|
||||||
* \return 0 on success otherwise a negative error code
|
* \return 0 on success otherwise a negative error code
|
||||||
*
|
*
|
||||||
|
|
@ -214,7 +214,7 @@ int snds_pcm_drain(snds_pcm_t *pcm)
|
||||||
* negative on playback underrun and greater than buffer size on
|
* negative on playback underrun and greater than buffer size on
|
||||||
* capture overrun.
|
* capture overrun.
|
||||||
*/
|
*/
|
||||||
int snds_pcm_delay(snds_pcm_t *pcm, snd_pcm_sframes_t *delayp)
|
int sndo_pcm_delay(sndo_pcm_t *pcm, snd_pcm_sframes_t *delayp)
|
||||||
{
|
{
|
||||||
int err = 0;
|
int err = 0;
|
||||||
snd_pcm_sframes_t pdelay, cdelay;
|
snd_pcm_sframes_t pdelay, cdelay;
|
||||||
|
|
@ -237,7 +237,7 @@ int snds_pcm_delay(snds_pcm_t *pcm, snd_pcm_sframes_t *delayp)
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* \brief Resume from suspend, no samples are lost
|
* \brief Resume from suspend, no samples are lost
|
||||||
* \param pcm simple PCM handle
|
* \param pcm ordinary PCM handle
|
||||||
* \return 0 on success otherwise a negative error code
|
* \return 0 on success otherwise a negative error code
|
||||||
* \retval -EAGAIN resume can't be proceed immediately (audio hardware is probably still suspended)
|
* \retval -EAGAIN resume can't be proceed immediately (audio hardware is probably still suspended)
|
||||||
* \retval -ENOSYS hardware doesn't support this feature
|
* \retval -ENOSYS hardware doesn't support this feature
|
||||||
|
|
@ -247,20 +247,20 @@ int snds_pcm_delay(snds_pcm_t *pcm, snd_pcm_sframes_t *delayp)
|
||||||
* this feature, when an -ENOSYS error is returned, use the snd_pcm_prepare
|
* this feature, when an -ENOSYS error is returned, use the snd_pcm_prepare
|
||||||
* function to recovery.
|
* function to recovery.
|
||||||
*/
|
*/
|
||||||
int snds_pcm_resume(snds_pcm_t *pcm)
|
int sndo_pcm_resume(sndo_pcm_t *pcm)
|
||||||
{
|
{
|
||||||
return snd_pcm_resume(pcm->master);
|
return snd_pcm_resume(pcm->master);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* \brief Wait for a PCM to become ready
|
* \brief Wait for a PCM to become ready
|
||||||
* \param pcm simple PCM handle
|
* \param pcm ordinary PCM handle
|
||||||
* \param timeout maximum time in milliseconds to wait
|
* \param timeout maximum time in milliseconds to wait
|
||||||
* \return a positive value on success otherwise a negative error code
|
* \return a positive value on success otherwise a negative error code
|
||||||
* \retval 0 timeout occurred
|
* \retval 0 timeout occurred
|
||||||
* \retval 1 PCM stream is ready for I/O
|
* \retval 1 PCM stream is ready for I/O
|
||||||
*/
|
*/
|
||||||
int snds_pcm_wait(snds_pcm_t *pcm, int timeout)
|
int sndo_pcm_wait(sndo_pcm_t *pcm, int timeout)
|
||||||
{
|
{
|
||||||
struct pollfd pfd[2];
|
struct pollfd pfd[2];
|
||||||
unsigned short p_revents, c_revents;
|
unsigned short p_revents, c_revents;
|
||||||
|
|
@ -295,90 +295,90 @@ int snds_pcm_wait(snds_pcm_t *pcm, int timeout)
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* \brief Get raw (lowlevel) playback PCM handle
|
* \brief Get raw (lowlevel) playback PCM handle
|
||||||
* \param pcm simple PCM handle
|
* \param pcm ordinary PCM handle
|
||||||
* \return raw (lowlevel) capture PCM handle or NULL
|
* \return raw (lowlevel) capture PCM handle or NULL
|
||||||
*/
|
*/
|
||||||
snd_pcm_t *snds_pcm_raw_playback(snds_pcm_t *pcm)
|
snd_pcm_t *sndo_pcm_raw_playback(sndo_pcm_t *pcm)
|
||||||
{
|
{
|
||||||
return pcm->playback;
|
return pcm->playback;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* \brief Get raw (lowlevel) capture PCM handle
|
* \brief Get raw (lowlevel) capture PCM handle
|
||||||
* \param pcm simple PCM handle
|
* \param pcm ordinary PCM handle
|
||||||
* \return raw (lowlevel) capture PCM handle or NULL
|
* \return raw (lowlevel) capture PCM handle or NULL
|
||||||
*/
|
*/
|
||||||
snd_pcm_t *snds_pcm_raw_capture(snds_pcm_t *pcm)
|
snd_pcm_t *sndo_pcm_raw_capture(sndo_pcm_t *pcm)
|
||||||
{
|
{
|
||||||
return pcm->capture;
|
return pcm->capture;
|
||||||
}
|
}
|
||||||
|
|
||||||
int snds_pcm_param_rate(snds_pcm_t *pcm, unsigned int rate, unsigned int *used_rate)
|
int sndo_pcm_param_rate(sndo_pcm_t *pcm, unsigned int rate, unsigned int *used_rate)
|
||||||
{
|
{
|
||||||
return -EIO;
|
return -EIO;
|
||||||
}
|
}
|
||||||
|
|
||||||
int snds_pcm_param_channels(snds_pcm_t *pcm, unsigned int channels, unsigned int *used_channels)
|
int sndo_pcm_param_channels(sndo_pcm_t *pcm, unsigned int channels, unsigned int *used_channels)
|
||||||
{
|
{
|
||||||
return -EIO;
|
return -EIO;
|
||||||
}
|
}
|
||||||
|
|
||||||
int snds_pcm_param_format(snds_pcm_t *pcm, snd_pcm_format_t format, snd_pcm_subformat_t subformat)
|
int sndo_pcm_param_format(sndo_pcm_t *pcm, snd_pcm_format_t format, snd_pcm_subformat_t subformat)
|
||||||
{
|
{
|
||||||
return -EIO;
|
return -EIO;
|
||||||
}
|
}
|
||||||
|
|
||||||
int snds_pcm_param_latency(snds_pcm_t *pcm, enum snds_pcm_latency_type latency)
|
int sndo_pcm_param_latency(sndo_pcm_t *pcm, enum sndo_pcm_latency_type latency)
|
||||||
{
|
{
|
||||||
return -EIO;
|
return -EIO;
|
||||||
}
|
}
|
||||||
|
|
||||||
int snds_pcm_param_access(snds_pcm_t *pcm, enum snds_pcm_access_type access)
|
int sndo_pcm_param_access(sndo_pcm_t *pcm, enum sndo_pcm_access_type access)
|
||||||
{
|
{
|
||||||
return -EIO;
|
return -EIO;
|
||||||
}
|
}
|
||||||
|
|
||||||
int snds_pcm_param_xrun(snds_pcm_t *pcm, enum snds_pcm_xrun_type xrun)
|
int sndo_pcm_param_xrun(sndo_pcm_t *pcm, enum sndo_pcm_xrun_type xrun)
|
||||||
{
|
{
|
||||||
return -EIO;
|
return -EIO;
|
||||||
}
|
}
|
||||||
|
|
||||||
int snds_pcm_pio_ibegin(snds_pcm_t *pcm, void *ring_buffer, snd_pcm_uframes_t *frames)
|
int sndo_pcm_pio_ibegin(sndo_pcm_t *pcm, void *ring_buffer, snd_pcm_uframes_t *frames)
|
||||||
{
|
{
|
||||||
return -EIO;
|
return -EIO;
|
||||||
}
|
}
|
||||||
|
|
||||||
int snds_pcm_pio_iend(snds_pcm_t *pcm, snd_pcm_uframes_t frames)
|
int sndo_pcm_pio_iend(sndo_pcm_t *pcm, snd_pcm_uframes_t frames)
|
||||||
{
|
{
|
||||||
return -EIO;
|
return -EIO;
|
||||||
}
|
}
|
||||||
|
|
||||||
int snds_pcm_pio_nbegin(snds_pcm_t *pcm, void **ring_buffer, snd_pcm_uframes_t *frames)
|
int sndo_pcm_pio_nbegin(sndo_pcm_t *pcm, void **ring_buffer, snd_pcm_uframes_t *frames)
|
||||||
{
|
{
|
||||||
return -EIO;
|
return -EIO;
|
||||||
}
|
}
|
||||||
|
|
||||||
int snds_pcm_pio_nend(snds_pcm_t *pcm, snd_pcm_uframes_t frames)
|
int sndo_pcm_pio_nend(sndo_pcm_t *pcm, snd_pcm_uframes_t frames)
|
||||||
{
|
{
|
||||||
return -EIO;
|
return -EIO;
|
||||||
}
|
}
|
||||||
|
|
||||||
int snds_pcm_cio_ibegin(snds_pcm_t *pcm, void *ring_buffer, snd_pcm_uframes_t *frames)
|
int sndo_pcm_cio_ibegin(sndo_pcm_t *pcm, void *ring_buffer, snd_pcm_uframes_t *frames)
|
||||||
{
|
{
|
||||||
return -EIO;
|
return -EIO;
|
||||||
}
|
}
|
||||||
|
|
||||||
int snds_pcm_cio_iend(snds_pcm_t *pcm, snd_pcm_uframes_t frames)
|
int sndo_pcm_cio_iend(sndo_pcm_t *pcm, snd_pcm_uframes_t frames)
|
||||||
{
|
{
|
||||||
return -EIO;
|
return -EIO;
|
||||||
}
|
}
|
||||||
|
|
||||||
int snds_pcm_cio_nbegin(snds_pcm_t *pcm, void **ring_buffer, snd_pcm_uframes_t *frames)
|
int sndo_pcm_cio_nbegin(sndo_pcm_t *pcm, void **ring_buffer, snd_pcm_uframes_t *frames)
|
||||||
{
|
{
|
||||||
return -EIO;
|
return -EIO;
|
||||||
}
|
}
|
||||||
|
|
||||||
int snds_pcm_cio_nend(snds_pcm_t *pcm, snd_pcm_uframes_t frames)
|
int sndo_pcm_cio_nend(sndo_pcm_t *pcm, snd_pcm_uframes_t frames)
|
||||||
{
|
{
|
||||||
return -EIO;
|
return -EIO;
|
||||||
}
|
}
|
||||||
|
|
@ -1,13 +0,0 @@
|
||||||
SUBDIRS =
|
|
||||||
DIST_SUBDIRS =
|
|
||||||
|
|
||||||
EXTRA_LTLIBRARIES = libsimplemixer.la
|
|
||||||
|
|
||||||
libsimplemixer_la_SOURCES = simple_mixer.c
|
|
||||||
noinst_HEADERS =
|
|
||||||
|
|
||||||
alsadir = $(datadir)/alsa
|
|
||||||
|
|
||||||
all: libsimplemixer.la
|
|
||||||
|
|
||||||
INCLUDES=-I$(top_srcdir)/include
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue