aboutsummaryrefslogtreecommitdiffstats
path: root/sound/pci/emu10k1/emupcm.c
diff options
context:
space:
mode:
authorJames Courtier-Dutton <James@superbug.co.uk>2006-10-10 13:08:45 -0400
committerJaroslav Kysela <perex@suse.cz>2007-02-09 03:00:40 -0500
commitb0dbdaea55d55c05be972cd2a040acfa073b0509 (patch)
treed1bcb3f75e87dd524832a43935c4c6569ca2f76a /sound/pci/emu10k1/emupcm.c
parent0f71e8b98506252db22a0c4fcfecb0aadcf393cc (diff)
[ALSA] snd-emu10k1: Add emu1010 internal clock rate control for 44100 or 48000.
Signed-off-by: James Courtier-Dutton <James@superbug.co.uk> Signed-off-by: Jaroslav Kysela <perex@suse.cz>
Diffstat (limited to 'sound/pci/emu10k1/emupcm.c')
-rw-r--r--sound/pci/emu10k1/emupcm.c28
1 files changed, 22 insertions, 6 deletions
diff --git a/sound/pci/emu10k1/emupcm.c b/sound/pci/emu10k1/emupcm.c
index 44d098ac86d5..ab4f5df5241b 100644
--- a/sound/pci/emu10k1/emupcm.c
+++ b/sound/pci/emu10k1/emupcm.c
@@ -358,7 +358,10 @@ static void snd_emu10k1_pcm_init_voice(struct snd_emu10k1 *emu,
358 snd_emu10k1_ptr_write(emu, PTRX, voice, (send_amount[0] << 8) | send_amount[1]); 358 snd_emu10k1_ptr_write(emu, PTRX, voice, (send_amount[0] << 8) | send_amount[1]);
359 snd_emu10k1_ptr_write(emu, DSL, voice, end_addr | (send_amount[3] << 24)); 359 snd_emu10k1_ptr_write(emu, DSL, voice, end_addr | (send_amount[3] << 24));
360 snd_emu10k1_ptr_write(emu, PSST, voice, start_addr | (send_amount[2] << 24)); 360 snd_emu10k1_ptr_write(emu, PSST, voice, start_addr | (send_amount[2] << 24));
361 pitch_target = emu10k1_calc_pitch_target(runtime->rate); 361 if (emu->card_capabilities->emu1010)
362 pitch_target = PITCH_48000; /* Disable interpolators on emu1010 card */
363 else
364 pitch_target = emu10k1_calc_pitch_target(runtime->rate);
362 if (extra) 365 if (extra)
363 snd_emu10k1_ptr_write(emu, CCCA, voice, start_addr | 366 snd_emu10k1_ptr_write(emu, CCCA, voice, start_addr |
364 emu10k1_select_interprom(pitch_target) | 367 emu10k1_select_interprom(pitch_target) |
@@ -698,7 +701,10 @@ static void snd_emu10k1_playback_trigger_voice(struct snd_emu10k1 *emu, struct s
698 voice = evoice->number; 701 voice = evoice->number;
699 702
700 pitch = snd_emu10k1_rate_to_pitch(runtime->rate) >> 8; 703 pitch = snd_emu10k1_rate_to_pitch(runtime->rate) >> 8;
701 pitch_target = emu10k1_calc_pitch_target(runtime->rate); 704 if (emu->card_capabilities->emu1010)
705 pitch_target = PITCH_48000; /* Disable interpolators on emu1010 card */
706 else
707 pitch_target = emu10k1_calc_pitch_target(runtime->rate);
702 snd_emu10k1_ptr_write(emu, PTRX_PITCHTARGET, voice, pitch_target); 708 snd_emu10k1_ptr_write(emu, PTRX_PITCHTARGET, voice, pitch_target);
703 if (master || evoice->epcm->type == PLAYBACK_EFX) 709 if (master || evoice->epcm->type == PLAYBACK_EFX)
704 snd_emu10k1_ptr_write(emu, CPF_CURRENTPITCH, voice, pitch_target); 710 snd_emu10k1_ptr_write(emu, CPF_CURRENTPITCH, voice, pitch_target);
@@ -1247,10 +1253,20 @@ static int snd_emu10k1_capture_efx_open(struct snd_pcm_substream *substream)
1247 * for 192kHz 24bit, one has 2 channels 1253 * for 192kHz 24bit, one has 2 channels
1248 */ 1254 */
1249#if 1 1255#if 1
1250 /* For 48kHz */ 1256 switch (emu->emu1010.internal_clock) {
1251 runtime->hw.rates = SNDRV_PCM_RATE_48000; 1257 case 0:
1252 runtime->hw.rate_min = runtime->hw.rate_max = 48000; 1258 /* For 44.1kHz */
1253 runtime->hw.channels_min = runtime->hw.channels_max = 8; 1259 runtime->hw.rates = SNDRV_PCM_RATE_44100;
1260 runtime->hw.rate_min = runtime->hw.rate_max = 44100;
1261 runtime->hw.channels_min = runtime->hw.channels_max = 8;
1262 break;
1263 case 1:
1264 /* For 48kHz */
1265 runtime->hw.rates = SNDRV_PCM_RATE_48000;
1266 runtime->hw.rate_min = runtime->hw.rate_max = 48000;
1267 runtime->hw.channels_min = runtime->hw.channels_max = 8;
1268 break;
1269 };
1254#endif 1270#endif
1255#if 0 1271#if 0
1256 /* For 96kHz */ 1272 /* For 96kHz */