From 21a3479a0b606d36fe24093f70a1c27328cec286 Mon Sep 17 00:00:00 2001 From: Jaroslav Kysela Date: Fri, 13 Jan 2006 09:12:11 +0100 Subject: [ALSA] PCM midlevel & PCM OSS - make procfs & OSS plugin code optional Modules: ALSA Core,PCM Midlevel,ALSA<-OSS emulation,USB generic driver 1) The verbose procfs code for the PCM midlevel and usb audio can be removed now (more patches will follow). CONFIG_SND_VERBOSE_PROCFS 2) The PCM OSS plugin system can be also compiled optionaly. CONFIG_SND_PCM_OSS_PLUGINS Signed-off-by: Jaroslav Kysela --- sound/core/oss/mulaw.c | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'sound/core/oss/mulaw.c') diff --git a/sound/core/oss/mulaw.c b/sound/core/oss/mulaw.c index 14f5578ec7a7..ed12c81fcf1b 100644 --- a/sound/core/oss/mulaw.c +++ b/sound/core/oss/mulaw.c @@ -22,6 +22,9 @@ */ #include + +#ifdef CONFIG_SND_PCM_OSS_PLUGINS + #include #include #include @@ -306,3 +309,5 @@ int snd_pcm_plugin_build_mulaw(struct snd_pcm_substream *plug, *r_plugin = plugin; return 0; } + +#endif -- cgit v1.2.2 From 0534ab4279bd25e2d0a888af07466446dac05d74 Mon Sep 17 00:00:00 2001 From: Takashi Iwai Date: Fri, 13 Jan 2006 12:09:12 +0100 Subject: [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 --- sound/core/oss/mulaw.c | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) (limited to 'sound/core/oss/mulaw.c') diff --git a/sound/core/oss/mulaw.c b/sound/core/oss/mulaw.c index ed12c81fcf1b..2eb18807e6d0 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, -- cgit v1.2.2