ALSA: emu10k1: allow to disable the SRC
authorClemens Ladisch <clemens@ladisch.de>
Fri, 16 Sep 2011 21:13:38 +0000 (23:13 +0200)
committerTakashi Iwai <tiwai@suse.de>
Tue, 20 Sep 2011 06:56:58 +0000 (08:56 +0200)
Add the PCM rule to allow disabling the PCM playback SRC.

Signed-off-by: Clemens Ladisch <clemens@ladisch.de>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
sound/pci/emu10k1/emupcm.c

index 622bace..e22b8e2 100644 (file)
@@ -1146,6 +1146,11 @@ static int snd_emu10k1_playback_open(struct snd_pcm_substream *substream)
                kfree(epcm);
                return err;
        }
+       err = snd_pcm_hw_rule_noresample(runtime, 48000);
+       if (err < 0) {
+               kfree(epcm);
+               return err;
+       }
        mix = &emu->pcm_mixer[substream->number];
        for (i = 0; i < 4; i++)
                mix->send_routing[0][i] = mix->send_routing[1][i] = mix->send_routing[2][i] = i;