mirror of
https://github.com/alsa-project/alsa-lib.git
synced 2025-11-02 09:01:48 -05:00
Completed mixer API. Improved iterators. Renamed control values struct. Rewritten simple elements implementation
This commit is contained in:
parent
38033b49dd
commit
a2d3434961
54 changed files with 2081 additions and 1712 deletions
|
|
@ -98,7 +98,7 @@ void snd_pcm_linear_convert(const snd_pcm_channel_area_t *dst_areas, snd_pcm_ufr
|
|||
void *conv = conv_labels[convidx];
|
||||
unsigned int channel;
|
||||
for (channel = 0; channel < channels; ++channel) {
|
||||
char *src;
|
||||
const char *src;
|
||||
char *dst;
|
||||
int src_step, dst_step;
|
||||
snd_pcm_uframes_t frames1;
|
||||
|
|
@ -152,7 +152,7 @@ static int snd_pcm_linear_hw_refine_cprepare(snd_pcm_t *pcm ATTRIBUTE_UNUSED, sn
|
|||
|
||||
static int snd_pcm_linear_hw_refine_sprepare(snd_pcm_t *pcm, snd_pcm_hw_params_t *sparams)
|
||||
{
|
||||
snd_pcm_linear_t *linear = pcm->private;
|
||||
snd_pcm_linear_t *linear = pcm->private_data;
|
||||
snd_pcm_access_mask_t saccess_mask = { SND_PCM_ACCBIT_MMAP };
|
||||
_snd_pcm_hw_params_any(sparams);
|
||||
_snd_pcm_hw_param_set_mask(sparams, SND_PCM_HW_PARAM_ACCESS,
|
||||
|
|
@ -210,7 +210,7 @@ static int snd_pcm_linear_hw_refine(snd_pcm_t *pcm, snd_pcm_hw_params_t *params)
|
|||
|
||||
static int snd_pcm_linear_hw_params(snd_pcm_t *pcm, snd_pcm_hw_params_t *params)
|
||||
{
|
||||
snd_pcm_linear_t *linear = pcm->private;
|
||||
snd_pcm_linear_t *linear = pcm->private_data;
|
||||
int err = snd_pcm_hw_params_slave(pcm, params,
|
||||
snd_pcm_linear_hw_refine_cchange,
|
||||
snd_pcm_linear_hw_refine_sprepare,
|
||||
|
|
@ -233,7 +233,7 @@ static snd_pcm_sframes_t snd_pcm_linear_write_areas(snd_pcm_t *pcm,
|
|||
snd_pcm_uframes_t size,
|
||||
snd_pcm_uframes_t *slave_sizep)
|
||||
{
|
||||
snd_pcm_linear_t *linear = pcm->private;
|
||||
snd_pcm_linear_t *linear = pcm->private_data;
|
||||
snd_pcm_t *slave = linear->plug.slave;
|
||||
snd_pcm_uframes_t xfer = 0;
|
||||
snd_pcm_sframes_t err = 0;
|
||||
|
|
@ -267,7 +267,7 @@ static snd_pcm_sframes_t snd_pcm_linear_read_areas(snd_pcm_t *pcm,
|
|||
snd_pcm_uframes_t size,
|
||||
snd_pcm_uframes_t *slave_sizep)
|
||||
{
|
||||
snd_pcm_linear_t *linear = pcm->private;
|
||||
snd_pcm_linear_t *linear = pcm->private_data;
|
||||
snd_pcm_t *slave = linear->plug.slave;
|
||||
snd_pcm_uframes_t xfer = 0;
|
||||
snd_pcm_sframes_t err = 0;
|
||||
|
|
@ -297,7 +297,7 @@ static snd_pcm_sframes_t snd_pcm_linear_read_areas(snd_pcm_t *pcm,
|
|||
|
||||
static void snd_pcm_linear_dump(snd_pcm_t *pcm, snd_output_t *out)
|
||||
{
|
||||
snd_pcm_linear_t *linear = pcm->private;
|
||||
snd_pcm_linear_t *linear = pcm->private_data;
|
||||
snd_output_printf(out, "Linear conversion PCM (%s)\n",
|
||||
snd_pcm_format_name(linear->sformat));
|
||||
if (pcm->setup) {
|
||||
|
|
@ -323,7 +323,7 @@ snd_pcm_ops_t snd_pcm_linear_ops = {
|
|||
munmap: snd_pcm_plugin_munmap,
|
||||
};
|
||||
|
||||
int snd_pcm_linear_open(snd_pcm_t **pcmp, char *name, snd_pcm_format_t sformat, snd_pcm_t *slave, int close_slave)
|
||||
int snd_pcm_linear_open(snd_pcm_t **pcmp, const char *name, snd_pcm_format_t sformat, snd_pcm_t *slave, int close_slave)
|
||||
{
|
||||
snd_pcm_t *pcm;
|
||||
snd_pcm_linear_t *linear;
|
||||
|
|
@ -354,7 +354,7 @@ int snd_pcm_linear_open(snd_pcm_t **pcmp, char *name, snd_pcm_format_t sformat,
|
|||
pcm->op_arg = pcm;
|
||||
pcm->fast_ops = &snd_pcm_plugin_fast_ops;
|
||||
pcm->fast_op_arg = pcm;
|
||||
pcm->private = linear;
|
||||
pcm->private_data = linear;
|
||||
pcm->poll_fd = slave->poll_fd;
|
||||
pcm->hw_ptr = &linear->plug.hw_ptr;
|
||||
pcm->appl_ptr = &linear->plug.appl_ptr;
|
||||
|
|
@ -363,16 +363,16 @@ int snd_pcm_linear_open(snd_pcm_t **pcmp, char *name, snd_pcm_format_t sformat,
|
|||
return 0;
|
||||
}
|
||||
|
||||
int _snd_pcm_linear_open(snd_pcm_t **pcmp, char *name,
|
||||
int _snd_pcm_linear_open(snd_pcm_t **pcmp, const char *name,
|
||||
snd_config_t *conf,
|
||||
snd_pcm_stream_t stream, int mode)
|
||||
{
|
||||
snd_config_iterator_t i;
|
||||
snd_config_iterator_t i, next;
|
||||
const char *sname = NULL;
|
||||
int err;
|
||||
snd_pcm_t *spcm;
|
||||
snd_pcm_format_t sformat = SND_PCM_FORMAT_UNKNOWN;
|
||||
snd_config_foreach(i, conf) {
|
||||
snd_config_for_each(i, next, conf) {
|
||||
snd_config_t *n = snd_config_iterator_entry(i);
|
||||
const char *id = snd_config_get_id(n);
|
||||
if (strcmp(id, "comment") == 0)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue