summaryrefslogtreecommitdiff
path: root/src/pcm/pcm_plug.c
diff options
context:
space:
mode:
authorAbramo Bagnara <abramo@alsa-project.org>2001-02-05 15:44:42 +0000
committerAbramo Bagnara <abramo@alsa-project.org>2001-02-05 15:44:42 +0000
commit5bf23ae9a1fd826533a59b603eb8d7394de6e617 (patch)
treefb1fabfc0a2d476411c741edd7896241a199b055 /src/pcm/pcm_plug.c
parenta83b209df2e93743487512b4b5078eef1a7c9093 (diff)
Encapsulated hwdep. Converted all enums to type safety
Diffstat (limited to 'src/pcm/pcm_plug.c')
-rw-r--r--src/pcm/pcm_plug.c17
1 files changed, 8 insertions, 9 deletions
diff --git a/src/pcm/pcm_plug.c b/src/pcm/pcm_plug.c
index 382a45db..398f2717 100644
--- a/src/pcm/pcm_plug.c
+++ b/src/pcm/pcm_plug.c
@@ -132,7 +132,7 @@ static snd_pcm_format_t snd_pcm_plug_slave_format(snd_pcm_format_t format, const
}
/* Fall through */
default:
- return SND_PCM_FORMAT_NONE;
+ return SND_PCM_FORMAT_UNKNOWN;
}
}
@@ -144,7 +144,7 @@ static snd_pcm_format_t snd_pcm_plug_slave_format(snd_pcm_format_t format, const
if (snd_pcm_format_mask_test(format_mask, f))
return f;
}
- return SND_PCM_FORMAT_NONE;
+ return SND_PCM_FORMAT_UNKNOWN;
}
w = snd_pcm_format_width(format);
u = snd_pcm_format_unsigned(format);
@@ -158,7 +158,7 @@ static snd_pcm_format_t snd_pcm_plug_slave_format(snd_pcm_format_t format, const
for (sgn = 0; sgn < 2; ++sgn) {
snd_pcm_format_t f;
f = snd_pcm_build_linear_format(w1, u1, e1);
- assert(f != SND_PCM_FORMAT_NONE);
+ assert(f != SND_PCM_FORMAT_UNKNOWN);
if (snd_pcm_format_mask_test(format_mask, f))
return f;
u1 = !u1;
@@ -172,7 +172,7 @@ static snd_pcm_format_t snd_pcm_plug_slave_format(snd_pcm_format_t format, const
dw = -8;
}
}
- return SND_PCM_FORMAT_NONE;
+ return SND_PCM_FORMAT_UNKNOWN;
}
#define SND_PCM_FMTBIT_PLUG (SND_PCM_FMTBIT_LINEAR | \
@@ -401,9 +401,8 @@ static int snd_pcm_plug_hw_refine_cprepare(snd_pcm_t *pcm ATTRIBUTE_UNUSED, snd_
static int snd_pcm_plug_hw_refine_sprepare(snd_pcm_t *pcm ATTRIBUTE_UNUSED, snd_pcm_hw_params_t *sparams)
{
- snd_pcm_plug_t *plug = pcm->private;
- snd_pcm_t *slave = plug->req_slave;
- return snd_pcm_hw_params_any(slave, sparams);
+ _snd_pcm_hw_params_any(sparams);
+ return 0;
}
static int snd_pcm_plug_hw_refine_schange(snd_pcm_t *pcm, snd_pcm_hw_params_t *params,
@@ -436,7 +435,7 @@ static int snd_pcm_plug_hw_refine_schange(snd_pcm_t *pcm, snd_pcm_hw_params_t *p
f = format;
else {
f = snd_pcm_plug_slave_format(format, sformat_mask);
- if (f == SND_PCM_FORMAT_NONE)
+ if (f == SND_PCM_FORMAT_UNKNOWN)
continue;
}
snd_pcm_format_mask_set(&sfmt_mask, f);
@@ -496,7 +495,7 @@ static int snd_pcm_plug_hw_refine_cchange(snd_pcm_t *pcm ATTRIBUTE_UNUSED,
f = format;
else {
f = snd_pcm_plug_slave_format(format, sformat_mask);
- if (f == SND_PCM_FORMAT_NONE)
+ if (f == SND_PCM_FORMAT_UNKNOWN)
continue;
}
snd_pcm_format_mask_set(&fmt_mask, format);