aboutsummaryrefslogtreecommitdiffstats
path: root/sound/pci/emu10k1/emupcm.c
diff options
context:
space:
mode:
Diffstat (limited to 'sound/pci/emu10k1/emupcm.c')
-rw-r--r--sound/pci/emu10k1/emupcm.c127
1 files changed, 97 insertions, 30 deletions
diff --git a/sound/pci/emu10k1/emupcm.c b/sound/pci/emu10k1/emupcm.c
index 717e92ec9e0a..44d098ac86d5 100644
--- a/sound/pci/emu10k1/emupcm.c
+++ b/sound/pci/emu10k1/emupcm.c
@@ -147,7 +147,7 @@ static int snd_emu10k1_pcm_channel_alloc(struct snd_emu10k1_pcm * epcm, int voic
147 1, 147 1,
148 &epcm->extra); 148 &epcm->extra);
149 if (err < 0) { 149 if (err < 0) {
150 // printk("pcm_channel_alloc: failed extra: voices=%d, frame=%d\n", voices, frame); 150 /* printk("pcm_channel_alloc: failed extra: voices=%d, frame=%d\n", voices, frame); */
151 for (i = 0; i < voices; i++) { 151 for (i = 0; i < voices; i++) {
152 snd_emu10k1_voice_free(epcm->emu, epcm->voices[i]); 152 snd_emu10k1_voice_free(epcm->emu, epcm->voices[i]);
153 epcm->voices[i] = NULL; 153 epcm->voices[i] = NULL;
@@ -339,7 +339,7 @@ static void snd_emu10k1_pcm_init_voice(struct snd_emu10k1 *emu,
339 } 339 }
340 } 340 }
341 341
342 // setup routing 342 /* setup routing */
343 if (emu->audigy) { 343 if (emu->audigy) {
344 snd_emu10k1_ptr_write(emu, A_FXRT1, voice, 344 snd_emu10k1_ptr_write(emu, A_FXRT1, voice,
345 snd_emu10k1_compose_audigy_fxrt1(send_routing)); 345 snd_emu10k1_compose_audigy_fxrt1(send_routing));
@@ -353,8 +353,8 @@ static void snd_emu10k1_pcm_init_voice(struct snd_emu10k1 *emu,
353 } else 353 } else
354 snd_emu10k1_ptr_write(emu, FXRT, voice, 354 snd_emu10k1_ptr_write(emu, FXRT, voice,
355 snd_emu10k1_compose_send_routing(send_routing)); 355 snd_emu10k1_compose_send_routing(send_routing));
356 // Stop CA 356 /* Stop CA */
357 // Assumption that PT is already 0 so no harm overwriting 357 /* Assumption that PT is already 0 so no harm overwriting */
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));
@@ -367,14 +367,14 @@ static void snd_emu10k1_pcm_init_voice(struct snd_emu10k1 *emu,
367 snd_emu10k1_ptr_write(emu, CCCA, voice, (start_addr + ccis) | 367 snd_emu10k1_ptr_write(emu, CCCA, voice, (start_addr + ccis) |
368 emu10k1_select_interprom(pitch_target) | 368 emu10k1_select_interprom(pitch_target) |
369 (w_16 ? 0 : CCCA_8BITSELECT)); 369 (w_16 ? 0 : CCCA_8BITSELECT));
370 // Clear filter delay memory 370 /* Clear filter delay memory */
371 snd_emu10k1_ptr_write(emu, Z1, voice, 0); 371 snd_emu10k1_ptr_write(emu, Z1, voice, 0);
372 snd_emu10k1_ptr_write(emu, Z2, voice, 0); 372 snd_emu10k1_ptr_write(emu, Z2, voice, 0);
373 // invalidate maps 373 /* invalidate maps */
374 silent_page = ((unsigned int)emu->silent_page.addr << 1) | MAP_PTI_MASK; 374 silent_page = ((unsigned int)emu->silent_page.addr << 1) | MAP_PTI_MASK;
375 snd_emu10k1_ptr_write(emu, MAPA, voice, silent_page); 375 snd_emu10k1_ptr_write(emu, MAPA, voice, silent_page);
376 snd_emu10k1_ptr_write(emu, MAPB, voice, silent_page); 376 snd_emu10k1_ptr_write(emu, MAPB, voice, silent_page);
377 // modulation envelope 377 /* modulation envelope */
378 snd_emu10k1_ptr_write(emu, CVCF, voice, 0xffff); 378 snd_emu10k1_ptr_write(emu, CVCF, voice, 0xffff);
379 snd_emu10k1_ptr_write(emu, VTFT, voice, 0xffff); 379 snd_emu10k1_ptr_write(emu, VTFT, voice, 0xffff);
380 snd_emu10k1_ptr_write(emu, ATKHLDM, voice, 0); 380 snd_emu10k1_ptr_write(emu, ATKHLDM, voice, 0);
@@ -385,12 +385,12 @@ static void snd_emu10k1_pcm_init_voice(struct snd_emu10k1 *emu,
385 snd_emu10k1_ptr_write(emu, TREMFRQ, voice, 0); 385 snd_emu10k1_ptr_write(emu, TREMFRQ, voice, 0);
386 snd_emu10k1_ptr_write(emu, FM2FRQ2, voice, 0); 386 snd_emu10k1_ptr_write(emu, FM2FRQ2, voice, 0);
387 snd_emu10k1_ptr_write(emu, ENVVAL, voice, 0x8000); 387 snd_emu10k1_ptr_write(emu, ENVVAL, voice, 0x8000);
388 // volume envelope 388 /* volume envelope */
389 snd_emu10k1_ptr_write(emu, ATKHLDV, voice, 0x7f7f); 389 snd_emu10k1_ptr_write(emu, ATKHLDV, voice, 0x7f7f);
390 snd_emu10k1_ptr_write(emu, ENVVOL, voice, 0x0000); 390 snd_emu10k1_ptr_write(emu, ENVVOL, voice, 0x0000);
391 // filter envelope 391 /* filter envelope */
392 snd_emu10k1_ptr_write(emu, PEFE_FILTERAMOUNT, voice, 0x7f); 392 snd_emu10k1_ptr_write(emu, PEFE_FILTERAMOUNT, voice, 0x7f);
393 // pitch envelope 393 /* pitch envelope */
394 snd_emu10k1_ptr_write(emu, PEFE_PITCHAMOUNT, voice, 0); 394 snd_emu10k1_ptr_write(emu, PEFE_PITCHAMOUNT, voice, 0);
395 395
396 spin_unlock_irqrestore(&emu->reg_lock, flags); 396 spin_unlock_irqrestore(&emu->reg_lock, flags);
@@ -468,7 +468,7 @@ static int snd_emu10k1_efx_playback_hw_free(struct snd_pcm_substream *substream)
468 snd_emu10k1_voice_free(epcm->emu, epcm->extra); 468 snd_emu10k1_voice_free(epcm->emu, epcm->extra);
469 epcm->extra = NULL; 469 epcm->extra = NULL;
470 } 470 }
471 for (i=0; i < NUM_EFX_PLAYBACK; i++) { 471 for (i = 0; i < NUM_EFX_PLAYBACK; i++) {
472 if (epcm->voices[i]) { 472 if (epcm->voices[i]) {
473 snd_emu10k1_voice_free(epcm->emu, epcm->voices[i]); 473 snd_emu10k1_voice_free(epcm->emu, epcm->voices[i]);
474 epcm->voices[i] = NULL; 474 epcm->voices[i] = NULL;
@@ -637,7 +637,7 @@ static void snd_emu10k1_playback_invalidate_cache(struct snd_emu10k1 *emu, int e
637 stereo = (!extra && runtime->channels == 2); 637 stereo = (!extra && runtime->channels == 2);
638 sample = snd_pcm_format_width(runtime->format) == 16 ? 0 : 0x80808080; 638 sample = snd_pcm_format_width(runtime->format) == 16 ? 0 : 0x80808080;
639 ccis = emu10k1_ccis(stereo, sample == 0); 639 ccis = emu10k1_ccis(stereo, sample == 0);
640 // set cs to 2 * number of cache registers beside the invalidated 640 /* set cs to 2 * number of cache registers beside the invalidated */
641 cs = (sample == 0) ? (32-ccis) : (64-ccis+1) >> 1; 641 cs = (sample == 0) ? (32-ccis) : (64-ccis+1) >> 1;
642 if (cs > 16) cs = 16; 642 if (cs > 16) cs = 16;
643 for (i = 0; i < cs; i++) { 643 for (i = 0; i < cs; i++) {
@@ -646,14 +646,14 @@ static void snd_emu10k1_playback_invalidate_cache(struct snd_emu10k1 *emu, int e
646 snd_emu10k1_ptr_write(emu, CD0 + i, voice + 1, sample); 646 snd_emu10k1_ptr_write(emu, CD0 + i, voice + 1, sample);
647 } 647 }
648 } 648 }
649 // reset cache 649 /* reset cache */
650 snd_emu10k1_ptr_write(emu, CCR_CACHEINVALIDSIZE, voice, 0); 650 snd_emu10k1_ptr_write(emu, CCR_CACHEINVALIDSIZE, voice, 0);
651 snd_emu10k1_ptr_write(emu, CCR_READADDRESS, voice, cra); 651 snd_emu10k1_ptr_write(emu, CCR_READADDRESS, voice, cra);
652 if (stereo) { 652 if (stereo) {
653 snd_emu10k1_ptr_write(emu, CCR_CACHEINVALIDSIZE, voice + 1, 0); 653 snd_emu10k1_ptr_write(emu, CCR_CACHEINVALIDSIZE, voice + 1, 0);
654 snd_emu10k1_ptr_write(emu, CCR_READADDRESS, voice + 1, cra); 654 snd_emu10k1_ptr_write(emu, CCR_READADDRESS, voice + 1, cra);
655 } 655 }
656 // fill cache 656 /* fill cache */
657 snd_emu10k1_ptr_write(emu, CCR_CACHEINVALIDSIZE, voice, ccis); 657 snd_emu10k1_ptr_write(emu, CCR_CACHEINVALIDSIZE, voice, ccis);
658 if (stereo) { 658 if (stereo) {
659 snd_emu10k1_ptr_write(emu, CCR_CACHEINVALIDSIZE, voice+1, ccis); 659 snd_emu10k1_ptr_write(emu, CCR_CACHEINVALIDSIZE, voice+1, ccis);
@@ -732,7 +732,7 @@ static int snd_emu10k1_playback_trigger(struct snd_pcm_substream *substream,
732 struct snd_emu10k1_pcm_mixer *mix; 732 struct snd_emu10k1_pcm_mixer *mix;
733 int result = 0; 733 int result = 0;
734 734
735 // printk("trigger - emu10k1 = 0x%x, cmd = %i, pointer = %i\n", (int)emu, cmd, substream->ops->pointer(substream)); 735 /* printk("trigger - emu10k1 = 0x%x, cmd = %i, pointer = %i\n", (int)emu, cmd, substream->ops->pointer(substream)); */
736 spin_lock(&emu->reg_lock); 736 spin_lock(&emu->reg_lock);
737 switch (cmd) { 737 switch (cmd) {
738 case SNDRV_PCM_TRIGGER_START: 738 case SNDRV_PCM_TRIGGER_START:
@@ -778,10 +778,10 @@ static int snd_emu10k1_capture_trigger(struct snd_pcm_substream *substream,
778 switch (cmd) { 778 switch (cmd) {
779 case SNDRV_PCM_TRIGGER_START: 779 case SNDRV_PCM_TRIGGER_START:
780 case SNDRV_PCM_TRIGGER_RESUME: 780 case SNDRV_PCM_TRIGGER_RESUME:
781 // hmm this should cause full and half full interrupt to be raised? 781 /* hmm this should cause full and half full interrupt to be raised? */
782 outl(epcm->capture_ipr, emu->port + IPR); 782 outl(epcm->capture_ipr, emu->port + IPR);
783 snd_emu10k1_intr_enable(emu, epcm->capture_inte); 783 snd_emu10k1_intr_enable(emu, epcm->capture_inte);
784 // printk("adccr = 0x%x, adcbs = 0x%x\n", epcm->adccr, epcm->adcbs); 784 /* printk("adccr = 0x%x, adcbs = 0x%x\n", epcm->adccr, epcm->adcbs); */
785 switch (epcm->type) { 785 switch (epcm->type) {
786 case CAPTURE_AC97ADC: 786 case CAPTURE_AC97ADC:
787 snd_emu10k1_ptr_write(emu, ADCCR, 0, epcm->capture_cr_val); 787 snd_emu10k1_ptr_write(emu, ADCCR, 0, epcm->capture_cr_val);
@@ -790,6 +790,7 @@ static int snd_emu10k1_capture_trigger(struct snd_pcm_substream *substream,
790 if (emu->audigy) { 790 if (emu->audigy) {
791 snd_emu10k1_ptr_write(emu, A_FXWC1, 0, epcm->capture_cr_val); 791 snd_emu10k1_ptr_write(emu, A_FXWC1, 0, epcm->capture_cr_val);
792 snd_emu10k1_ptr_write(emu, A_FXWC2, 0, epcm->capture_cr_val2); 792 snd_emu10k1_ptr_write(emu, A_FXWC2, 0, epcm->capture_cr_val2);
793 snd_printdd("cr_val=0x%x, cr_val2=0x%x\n", epcm->capture_cr_val, epcm->capture_cr_val2);
793 } else 794 } else
794 snd_emu10k1_ptr_write(emu, FXWC, 0, epcm->capture_cr_val); 795 snd_emu10k1_ptr_write(emu, FXWC, 0, epcm->capture_cr_val);
795 break; 796 break;
@@ -851,7 +852,7 @@ static snd_pcm_uframes_t snd_emu10k1_playback_pointer(struct snd_pcm_substream *
851 ptr -= runtime->buffer_size; 852 ptr -= runtime->buffer_size;
852 } 853 }
853#endif 854#endif
854 // printk("ptr = 0x%x, buffer_size = 0x%x, period_size = 0x%x\n", ptr, runtime->buffer_size, runtime->period_size); 855 /* printk("ptr = 0x%x, buffer_size = 0x%x, period_size = 0x%x\n", ptr, runtime->buffer_size, runtime->period_size); */
855 return ptr; 856 return ptr;
856} 857}
857 858
@@ -868,7 +869,7 @@ static int snd_emu10k1_efx_playback_trigger(struct snd_pcm_substream *substream,
868 spin_lock(&emu->reg_lock); 869 spin_lock(&emu->reg_lock);
869 switch (cmd) { 870 switch (cmd) {
870 case SNDRV_PCM_TRIGGER_START: 871 case SNDRV_PCM_TRIGGER_START:
871 // prepare voices 872 /* prepare voices */
872 for (i = 0; i < NUM_EFX_PLAYBACK; i++) { 873 for (i = 0; i < NUM_EFX_PLAYBACK; i++) {
873 snd_emu10k1_playback_invalidate_cache(emu, 0, epcm->voices[i]); 874 snd_emu10k1_playback_invalidate_cache(emu, 0, epcm->voices[i]);
874 } 875 }
@@ -917,7 +918,7 @@ static snd_pcm_uframes_t snd_emu10k1_capture_pointer(struct snd_pcm_substream *s
917 if (!epcm->running) 918 if (!epcm->running)
918 return 0; 919 return 0;
919 if (epcm->first_ptr) { 920 if (epcm->first_ptr) {
920 udelay(50); // hack, it takes awhile until capture is started 921 udelay(50); /* hack, it takes awhile until capture is started */
921 epcm->first_ptr = 0; 922 epcm->first_ptr = 0;
922 } 923 }
923 ptr = snd_emu10k1_ptr_read(emu, epcm->capture_idx_reg, 0) & 0x0000ffff; 924 ptr = snd_emu10k1_ptr_read(emu, epcm->capture_idx_reg, 0) & 0x0000ffff;
@@ -972,6 +973,28 @@ static struct snd_pcm_hardware snd_emu10k1_capture =
972 .fifo_size = 0, 973 .fifo_size = 0,
973}; 974};
974 975
976static struct snd_pcm_hardware snd_emu10k1_capture_efx =
977{
978 .info = (SNDRV_PCM_INFO_MMAP | SNDRV_PCM_INFO_INTERLEAVED |
979 SNDRV_PCM_INFO_BLOCK_TRANSFER |
980 SNDRV_PCM_INFO_RESUME |
981 SNDRV_PCM_INFO_MMAP_VALID),
982 .formats = SNDRV_PCM_FMTBIT_S16_LE,
983 .rates = SNDRV_PCM_RATE_44100 | SNDRV_PCM_RATE_48000 |
984 SNDRV_PCM_RATE_88200 | SNDRV_PCM_RATE_96000 |
985 SNDRV_PCM_RATE_176400 | SNDRV_PCM_RATE_192000,
986 .rate_min = 44100,
987 .rate_max = 192000,
988 .channels_min = 8,
989 .channels_max = 8,
990 .buffer_bytes_max = (64*1024),
991 .period_bytes_min = 384,
992 .period_bytes_max = (64*1024),
993 .periods_min = 2,
994 .periods_max = 2,
995 .fifo_size = 0,
996};
997
975/* 998/*
976 * 999 *
977 */ 1000 */
@@ -1016,7 +1039,7 @@ static int snd_emu10k1_efx_playback_close(struct snd_pcm_substream *substream)
1016 struct snd_emu10k1_pcm_mixer *mix; 1039 struct snd_emu10k1_pcm_mixer *mix;
1017 int i; 1040 int i;
1018 1041
1019 for (i=0; i < NUM_EFX_PLAYBACK; i++) { 1042 for (i = 0; i < NUM_EFX_PLAYBACK; i++) {
1020 mix = &emu->efx_pcm_mixer[i]; 1043 mix = &emu->efx_pcm_mixer[i];
1021 mix->epcm = NULL; 1044 mix->epcm = NULL;
1022 snd_emu10k1_pcm_efx_mixer_notify(emu, i, 0); 1045 snd_emu10k1_pcm_efx_mixer_notify(emu, i, 0);
@@ -1045,7 +1068,7 @@ static int snd_emu10k1_efx_playback_open(struct snd_pcm_substream *substream)
1045 runtime->private_free = snd_emu10k1_pcm_free_substream; 1068 runtime->private_free = snd_emu10k1_pcm_free_substream;
1046 runtime->hw = snd_emu10k1_efx_playback; 1069 runtime->hw = snd_emu10k1_efx_playback;
1047 1070
1048 for (i=0; i < NUM_EFX_PLAYBACK; i++) { 1071 for (i = 0; i < NUM_EFX_PLAYBACK; i++) {
1049 mix = &emu->efx_pcm_mixer[i]; 1072 mix = &emu->efx_pcm_mixer[i];
1050 mix->send_routing[0][0] = i; 1073 mix->send_routing[0][0] = i;
1051 memset(&mix->send_volume, 0, sizeof(mix->send_volume)); 1074 memset(&mix->send_volume, 0, sizeof(mix->send_volume));
@@ -1199,15 +1222,59 @@ static int snd_emu10k1_capture_efx_open(struct snd_pcm_substream *substream)
1199 epcm->capture_idx_reg = FXIDX; 1222 epcm->capture_idx_reg = FXIDX;
1200 substream->runtime->private_data = epcm; 1223 substream->runtime->private_data = epcm;
1201 substream->runtime->private_free = snd_emu10k1_pcm_free_substream; 1224 substream->runtime->private_free = snd_emu10k1_pcm_free_substream;
1202 runtime->hw = snd_emu10k1_capture; 1225 runtime->hw = snd_emu10k1_capture_efx;
1203 runtime->hw.rates = SNDRV_PCM_RATE_48000; 1226 runtime->hw.rates = SNDRV_PCM_RATE_48000;
1204 runtime->hw.rate_min = runtime->hw.rate_max = 48000; 1227 runtime->hw.rate_min = runtime->hw.rate_max = 48000;
1205 spin_lock_irq(&emu->reg_lock); 1228 spin_lock_irq(&emu->reg_lock);
1206 runtime->hw.channels_min = runtime->hw.channels_max = 0; 1229 if (emu->card_capabilities->emu1010) {
1207 for (idx = 0; idx < nefx; idx++) { 1230 /* TODO
1208 if (emu->efx_voices_mask[idx/32] & (1 << (idx%32))) { 1231 * SNDRV_PCM_FMTBIT_S16_LE | SNDRV_PCM_FMTBIT_S32_LE
1209 runtime->hw.channels_min++; 1232 * SNDRV_PCM_RATE_44100 | SNDRV_PCM_RATE_48000 |
1210 runtime->hw.channels_max++; 1233 * SNDRV_PCM_RATE_88200 | SNDRV_PCM_RATE_96000 |
1234 * SNDRV_PCM_RATE_176400 | SNDRV_PCM_RATE_192000
1235 * rate_min = 44100,
1236 * rate_max = 192000,
1237 * channels_min = 8,
1238 * channels_max = 8,
1239 * Need to add mixer control to fix sample rate
1240 *
1241 * There are 16 mono channels of 16bits each.
1242 * 24bit Audio uses 2x channels over 16bit
1243 * 96kHz uses 2x channels over 48kHz
1244 * 192kHz uses 4x channels over 48kHz
1245 * So, for 48kHz 24bit, one has 8 channels
1246 * for 96kHz 24bit, one has 4 channels
1247 * for 192kHz 24bit, one has 2 channels
1248 */
1249#if 1
1250 /* For 48kHz */
1251 runtime->hw.rates = SNDRV_PCM_RATE_48000;
1252 runtime->hw.rate_min = runtime->hw.rate_max = 48000;
1253 runtime->hw.channels_min = runtime->hw.channels_max = 8;
1254#endif
1255#if 0
1256 /* For 96kHz */
1257 runtime->hw.rates = SNDRV_PCM_RATE_96000;
1258 runtime->hw.rate_min = runtime->hw.rate_max = 96000;
1259 runtime->hw.channels_min = runtime->hw.channels_max = 4;
1260#endif
1261#if 0
1262 /* For 192kHz */
1263 runtime->hw.rates = SNDRV_PCM_RATE_192000;
1264 runtime->hw.rate_min = runtime->hw.rate_max = 192000;
1265 runtime->hw.channels_min = runtime->hw.channels_max = 2;
1266#endif
1267 runtime->hw.formats = SNDRV_PCM_FMTBIT_S32_LE;
1268 /* efx_voices_mask[0] is expected to be zero
1269 * efx_voices_mask[1] is expected to have 16bits set
1270 */
1271 } else {
1272 runtime->hw.channels_min = runtime->hw.channels_max = 0;
1273 for (idx = 0; idx < nefx; idx++) {
1274 if (emu->efx_voices_mask[idx/32] & (1 << (idx%32))) {
1275 runtime->hw.channels_min++;
1276 runtime->hw.channels_max++;
1277 }
1211 } 1278 }
1212 } 1279 }
1213 epcm->capture_cr_val = emu->efx_voices_mask[0]; 1280 epcm->capture_cr_val = emu->efx_voices_mask[0];
@@ -1460,7 +1527,7 @@ static void snd_emu10k1_fx8010_playback_tram_poke1(unsigned short *dst_left,
1460 unsigned int count, 1527 unsigned int count,
1461 unsigned int tram_shift) 1528 unsigned int tram_shift)
1462{ 1529{
1463 // printk("tram_poke1: dst_left = 0x%p, dst_right = 0x%p, src = 0x%p, count = 0x%x\n", dst_left, dst_right, src, count); 1530 /* printk("tram_poke1: dst_left = 0x%p, dst_right = 0x%p, src = 0x%p, count = 0x%x\n", dst_left, dst_right, src, count); */
1464 if ((tram_shift & 1) == 0) { 1531 if ((tram_shift & 1) == 0) {
1465 while (count--) { 1532 while (count--) {
1466 *dst_left-- = *src++; 1533 *dst_left-- = *src++;
@@ -1537,7 +1604,7 @@ static int snd_emu10k1_fx8010_playback_prepare(struct snd_pcm_substream *substre
1537 struct snd_emu10k1_fx8010_pcm *pcm = &emu->fx8010.pcm[substream->number]; 1604 struct snd_emu10k1_fx8010_pcm *pcm = &emu->fx8010.pcm[substream->number];
1538 unsigned int i; 1605 unsigned int i;
1539 1606
1540 // printk("prepare: etram_pages = 0x%p, dma_area = 0x%x, buffer_size = 0x%x (0x%x)\n", emu->fx8010.etram_pages, runtime->dma_area, runtime->buffer_size, runtime->buffer_size << 2); 1607 /* printk("prepare: etram_pages = 0x%p, dma_area = 0x%x, buffer_size = 0x%x (0x%x)\n", emu->fx8010.etram_pages, runtime->dma_area, runtime->buffer_size, runtime->buffer_size << 2); */
1541 memset(&pcm->pcm_rec, 0, sizeof(pcm->pcm_rec)); 1608 memset(&pcm->pcm_rec, 0, sizeof(pcm->pcm_rec));
1542 pcm->pcm_rec.hw_buffer_size = pcm->buffer_size * 2; /* byte size */ 1609 pcm->pcm_rec.hw_buffer_size = pcm->buffer_size * 2; /* byte size */
1543 pcm->pcm_rec.sw_buffer_size = snd_pcm_lib_buffer_bytes(substream); 1610 pcm->pcm_rec.sw_buffer_size = snd_pcm_lib_buffer_bytes(substream);