[ALSA] Fix mulaw -> linear conversion in OSS PCM emulation
authorTakashi Iwai <tiwai@suse.de>
Fri, 20 Jan 2006 16:13:45 +0000 (17:13 +0100)
committerJaroslav Kysela <perex@suse.cz>
Wed, 22 Mar 2006 09:28:02 +0000 (10:28 +0100)
Modules: ALSA<-OSS emulation

Fixed the missing mulaw -> linear conversion in OSS PCM emulation code.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
sound/core/oss/pcm_plugin.c

index cec2774..0e67dd2 100644 (file)
@@ -470,7 +470,8 @@ int snd_pcm_plug_format_plugins(struct snd_pcm_substream *plug,
        /* format change */
        if (srcformat.format != dstformat.format) {
                tmpformat.format = dstformat.format;
-               if (tmpformat.format == SNDRV_PCM_FORMAT_MU_LAW) {
+               if (srcformat.format == SNDRV_PCM_FORMAT_MU_LAW ||
+                   tmpformat.format == SNDRV_PCM_FORMAT_MU_LAW) {
                        err = snd_pcm_plugin_build_mulaw(plug,
                                                         &srcformat, &tmpformat,
                                                         &plugin);