Changeset 598 for GPL/trunk/alsa-kernel/pci/emu10k1/emupcm.c
- Timestamp:
- Apr 3, 2017, 4:51:56 PM (8 years ago)
- Location:
- GPL/trunk
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
GPL/trunk
-
Property svn:mergeinfo
set to
/GPL/branches/uniaud32-2.1.x merged eligible
-
Property svn:mergeinfo
set to
-
GPL/trunk/alsa-kernel/pci/emu10k1/emupcm.c
r464 r598 333 333 if (extra) { 334 334 start_addr += ccis; 335 end_addr += ccis ;335 end_addr += ccis + emu->delay_pcm_irq; 336 336 } 337 337 if (stereo && !extra) { … … 361 361 snd_emu10k1_ptr_write(emu, PTRX, voice, (send_amount[0] << 8) | send_amount[1]); 362 362 snd_emu10k1_ptr_write(emu, DSL, voice, end_addr | (send_amount[3] << 24)); 363 snd_emu10k1_ptr_write(emu, PSST, voice, start_addr | (send_amount[2] << 24)); 363 snd_emu10k1_ptr_write(emu, PSST, voice, 364 (start_addr + (extra ? emu->delay_pcm_irq : 0)) | 365 (send_amount[2] << 24)); 364 366 if (emu->card_capabilities->emu_model) 365 367 pitch_target = PITCH_48000; /* Disable interpolators on emu1010 card */ … … 733 735 } 734 736 737 static inline void snd_emu10k1_playback_mangle_extra(struct snd_emu10k1 *emu, 738 struct snd_emu10k1_pcm *epcm, 739 struct snd_pcm_substream *substream, 740 struct snd_pcm_runtime *runtime) 741 { 742 unsigned int ptr, period_pos; 743 744 /* try to sychronize the current position for the interrupt 745 source voice */ 746 period_pos = runtime->status->hw_ptr - runtime->hw_ptr_interrupt; 747 period_pos %= runtime->period_size; 748 ptr = snd_emu10k1_ptr_read(emu, CCCA, epcm->extra->number); 749 ptr &= ~0x00ffffff; 750 ptr |= epcm->ccca_start_addr + period_pos; 751 snd_emu10k1_ptr_write(emu, CCCA, epcm->extra->number, ptr); 752 } 753 735 754 static int snd_emu10k1_playback_trigger(struct snd_pcm_substream *substream, 736 755 int cmd) … … 754 773 case SNDRV_PCM_TRIGGER_PAUSE_RELEASE: 755 774 case SNDRV_PCM_TRIGGER_RESUME: 775 if (cmd == SNDRV_PCM_TRIGGER_PAUSE_RELEASE) 776 snd_emu10k1_playback_mangle_extra(emu, epcm, substream, runtime); 756 777 mix = &emu->pcm_mixer[substream->number]; 757 778 snd_emu10k1_playback_prepare_voice(emu, epcm->voices[0], 1, 0, mix); … … 870 891 /* 871 892 printk(KERN_DEBUG 872 "ptr = 0x%x, buffer_size = 0x%x, period_size = 0x%x\n", 873 ptr, runtime->buffer_size, runtime->period_size); 893 "ptr = 0x%lx, buffer_size = 0x%lx, period_size = 0x%lx\n", 894 (long)ptr, (long)runtime->buffer_size, 895 (long)runtime->period_size); 874 896 */ 875 897 return ptr;
Note:
See TracChangeset
for help on using the changeset viewer.