Lines Matching full:sp

25 snd_emu10k1_sample_new(struct snd_emux *rec, struct snd_sf_sample *sp,  in snd_emu10k1_sample_new()  argument
38 if (snd_BUG_ON(!sp || !hdr)) in snd_emu10k1_sample_new()
41 if (sp->v.mode_flags & (SNDRV_SFNT_SAMPLE_BIDIR_LOOP | SNDRV_SFNT_SAMPLE_REVERSE_LOOP)) { in snd_emu10k1_sample_new()
45 sp->v.sample); in snd_emu10k1_sample_new()
48 if (sp->v.mode_flags & SNDRV_SFNT_SAMPLE_8BITS) { in snd_emu10k1_sample_new()
51 xor = (sp->v.mode_flags & SNDRV_SFNT_SAMPLE_UNSIGNED) ? 0 : 0x80808080; in snd_emu10k1_sample_new()
55 xor = (sp->v.mode_flags & SNDRV_SFNT_SAMPLE_UNSIGNED) ? 0x80008000 : 0; in snd_emu10k1_sample_new()
59 truesize = sp->v.size + BLANK_HEAD_SIZE; in snd_emu10k1_sample_new()
60 if (sp->v.mode_flags & SNDRV_SFNT_SAMPLE_NO_BLANK) { in snd_emu10k1_sample_new()
63 if (sp->v.mode_flags & SNDRV_SFNT_SAMPLE_SINGLESHOT) { in snd_emu10k1_sample_new()
64 sp->v.loopstart = sp->v.end + BLANK_LOOP_START; in snd_emu10k1_sample_new()
65 sp->v.loopend = sp->v.end + BLANK_LOOP_END; in snd_emu10k1_sample_new()
69 loop_start = sp->v.loopstart; in snd_emu10k1_sample_new()
70 loop_end = sp->v.loopend; in snd_emu10k1_sample_new()
74 data_end = sp->v.end; in snd_emu10k1_sample_new()
77 sp->v.start += BLANK_HEAD_SIZE; in snd_emu10k1_sample_new()
78 sp->v.end += BLANK_HEAD_SIZE; in snd_emu10k1_sample_new()
79 sp->v.loopstart += BLANK_HEAD_SIZE; in snd_emu10k1_sample_new()
80 sp->v.loopend += BLANK_HEAD_SIZE; in snd_emu10k1_sample_new()
90 while (sp->v.loopend < 64) { in snd_emu10k1_sample_new()
92 sp->v.loopstart += loop_size; in snd_emu10k1_sample_new()
93 sp->v.loopend += loop_size; in snd_emu10k1_sample_new()
94 sp->v.end += loop_size; in snd_emu10k1_sample_new()
100 sp->block = snd_emu10k1_synth_alloc(emu, blocksize); in snd_emu10k1_sample_new()
101 if (sp->block == NULL) { in snd_emu10k1_sample_new()
108 sp->v.truesize = blocksize; in snd_emu10k1_sample_new()
113 snd_emu10k1_synth_memset(emu, sp->block, offset, size, fill); in snd_emu10k1_sample_new()
119 if (snd_emu10k1_synth_copy_from_user(emu, sp->block, offset, data, size, xor)) in snd_emu10k1_sample_new()
126 if (snd_emu10k1_synth_copy_from_user(emu, sp->block, offset, data, size, xor)) in snd_emu10k1_sample_new()
135 if (snd_emu10k1_synth_copy_from_user(emu, sp->block, offset, data, size, xor)) in snd_emu10k1_sample_new()
141 snd_emu10k1_synth_memset(emu, sp->block, offset, blocksize - offset, fill); in snd_emu10k1_sample_new()
146 snd_emu10k1_synth_free(emu, sp->block); in snd_emu10k1_sample_new()
147 sp->block = NULL; in snd_emu10k1_sample_new()
155 snd_emu10k1_sample_free(struct snd_emux *rec, struct snd_sf_sample *sp, in snd_emu10k1_sample_free() argument
161 if (snd_BUG_ON(!sp || !hdr)) in snd_emu10k1_sample_free()
164 if (sp->block) { in snd_emu10k1_sample_free()
165 snd_emu10k1_synth_free(emu, sp->block); in snd_emu10k1_sample_free()
166 sp->block = NULL; in snd_emu10k1_sample_free()