diff options
author | Takashi Iwai <tiwai@suse.de> | 2006-01-13 12:09:12 +0100 |
---|---|---|
committer | Jaroslav Kysela <perex@suse.cz> | 2006-03-22 10:23:20 +0100 |
commit | 0534ab4279bd25e2d0a888af07466446dac05d74 (patch) | |
tree | c5e6f6398101e9b278db7d7749f93035d6e1fae6 /sound/core/oss/mulaw.c | |
parent | 9d83911ac082c6d63c1c08f235349113d8c1d0a3 (diff) | |
download | op-kernel-dev-0534ab4279bd25e2d0a888af07466446dac05d74.zip op-kernel-dev-0534ab4279bd25e2d0a888af07466446dac05d74.tar.gz |
[ALSA] Clean up pcm-oss plugins
Modules: ALSA<-OSS emulation
Clean up pcm-oss plugin codes.
Removed dead codes, and simplified route/rate plugins.
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Diffstat (limited to 'sound/core/oss/mulaw.c')
-rw-r--r-- | sound/core/oss/mulaw.c | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/sound/core/oss/mulaw.c b/sound/core/oss/mulaw.c index ed12c81..2eb1880 100644 --- a/sound/core/oss/mulaw.c +++ b/sound/core/oss/mulaw.c @@ -265,6 +265,25 @@ static snd_pcm_sframes_t mulaw_transfer(struct snd_pcm_plugin *plugin, return frames; } +static int getput_index(int format) +{ + int sign, width, endian; + sign = !snd_pcm_format_signed(format); + width = snd_pcm_format_width(format) / 8 - 1; + if (width < 0 || width > 3) { + snd_printk(KERN_ERR "snd-pcm-oss: invalid format %d\n", format); + width = 0; + } +#ifdef SNDRV_LITTLE_ENDIAN + endian = snd_pcm_format_big_endian(format); +#else + endian = snd_pcm_format_little_endian(format); +#endif + if (endian < 0) + endian = 0; + return width * 4 + endian * 2 + sign; +} + int snd_pcm_plugin_build_mulaw(struct snd_pcm_substream *plug, struct snd_pcm_plugin_format *src_format, struct snd_pcm_plugin_format *dst_format, |