[alsa-devel] [PATCH] Allow to switch hardware sampe rate on EMU

Mihail Zenkov mihail.zenkov at gmail.com
Fri Feb 22 18:59:38 CET 2013


Commit 57e5c63007955838043e34c732d224b2cbbb128f "emu10k1: allow to
disable the SRC"
force hardware use only one rate (48000 hz), but EMU have support two hardware
sampling rates (44100 and 48000 hz).

Signed-off-by: Mihail Zenkov <mihail.zenkov at gmail.com>

--- linux-3.8/sound/pci/emu10k1/emupcm.c
+++ linux-3.8-1/sound/pci/emu10k1/emupcm.c
@@ -1127,7 +1127,7 @@
 	struct snd_emu10k1_pcm *epcm;
 	struct snd_emu10k1_pcm_mixer *mix;
 	struct snd_pcm_runtime *runtime = substream->runtime;
-	int i, err;
+	int i, err, sample_rate;

 	epcm = kzalloc(sizeof(*epcm), GFP_KERNEL);
 	if (epcm == NULL)
@@ -1146,7 +1146,11 @@
 		kfree(epcm);
 		return err;
 	}
-	err = snd_pcm_hw_rule_noresample(runtime, 48000);
+	if (emu->card_capabilities->emu_model && emu->emu1010.internal_clock == 0)
+		sample_rate = 44100;
+	else
+		sample_rate = 48000;
+	err = snd_pcm_hw_rule_noresample(runtime, sample_rate);
 	if (err < 0) {
 		kfree(epcm);
 		return err;


More information about the Alsa-devel mailing list