• Home
  • Raw
  • Download

Lines Matching refs:sp

25 snd_emu10k1_sample_new(struct snd_emux *rec, struct snd_sf_sample *sp,  in snd_emu10k1_sample_new()  argument
36 if (snd_BUG_ON(!sp || !hdr)) in snd_emu10k1_sample_new()
39 if (sp->v.size == 0) { in snd_emu10k1_sample_new()
41 "emu: rom font for sample %d\n", sp->v.sample); in snd_emu10k1_sample_new()
46 sp->v.end -= sp->v.start; in snd_emu10k1_sample_new()
47 sp->v.loopstart -= sp->v.start; in snd_emu10k1_sample_new()
48 sp->v.loopend -= sp->v.start; in snd_emu10k1_sample_new()
49 sp->v.start = 0; in snd_emu10k1_sample_new()
52 sampleend = sp->v.end; in snd_emu10k1_sample_new()
53 if (sampleend > sp->v.size) in snd_emu10k1_sample_new()
54 sampleend = sp->v.size; in snd_emu10k1_sample_new()
55 loopend = sp->v.loopend; in snd_emu10k1_sample_new()
60 if (sp->v.loopstart >= sp->v.loopend) in snd_emu10k1_sample_new()
61 swap(sp->v.loopstart, sp->v.loopend); in snd_emu10k1_sample_new()
64 truesize = sp->v.size + BLANK_HEAD_SIZE; in snd_emu10k1_sample_new()
67 if (sp->v.mode_flags & (SNDRV_SFNT_SAMPLE_BIDIR_LOOP|SNDRV_SFNT_SAMPLE_REVERSE_LOOP)) in snd_emu10k1_sample_new()
68 loopsize = sp->v.loopend - sp->v.loopstart; in snd_emu10k1_sample_new()
71 if (sp->v.mode_flags & SNDRV_SFNT_SAMPLE_NO_BLANK) in snd_emu10k1_sample_new()
76 if (! (sp->v.mode_flags & SNDRV_SFNT_SAMPLE_8BITS)) in snd_emu10k1_sample_new()
78 sp->block = snd_emu10k1_synth_alloc(emu, blocksize); in snd_emu10k1_sample_new()
79 if (sp->block == NULL) { in snd_emu10k1_sample_new()
86 sp->v.truesize = blocksize; in snd_emu10k1_sample_new()
91 if (! (sp->v.mode_flags & SNDRV_SFNT_SAMPLE_8BITS)) in snd_emu10k1_sample_new()
95 snd_emu10k1_synth_bzero(emu, sp->block, offset, size); in snd_emu10k1_sample_new()
100 if (! (sp->v.mode_flags & SNDRV_SFNT_SAMPLE_8BITS)) in snd_emu10k1_sample_new()
104 if (snd_emu10k1_synth_copy_from_user(emu, sp->block, offset, data, size)) { in snd_emu10k1_sample_new()
105 snd_emu10k1_synth_free(emu, sp->block); in snd_emu10k1_sample_new()
106 sp->block = NULL; in snd_emu10k1_sample_new()
114 if (sp->v.mode_flags & (SNDRV_SFNT_SAMPLE_BIDIR_LOOP|SNDRV_SFNT_SAMPLE_REVERSE_LOOP)) { in snd_emu10k1_sample_new()
116 if (! (sp->v.mode_flags & SNDRV_SFNT_SAMPLE_8BITS)) { in snd_emu10k1_sample_new()
134 if (sp->v.mode_flags & SNDRV_SFNT_SAMPLE_BIDIR_LOOP) { in snd_emu10k1_sample_new()
135 sp->v.loopend += loopsize; in snd_emu10k1_sample_new()
137 sp->v.loopstart += loopsize; in snd_emu10k1_sample_new()
138 sp->v.loopend += loopsize; in snd_emu10k1_sample_new()
141 sp->v.end += loopsize; in snd_emu10k1_sample_new()
146 size = sp->v.size - loopend; in snd_emu10k1_sample_new()
149 if (! (sp->v.mode_flags & SNDRV_SFNT_SAMPLE_8BITS)) in snd_emu10k1_sample_new()
151 if (snd_emu10k1_synth_copy_from_user(emu, sp->block, offset, data, size)) { in snd_emu10k1_sample_new()
152 snd_emu10k1_synth_free(emu, sp->block); in snd_emu10k1_sample_new()
153 sp->block = NULL; in snd_emu10k1_sample_new()
160 snd_emu10k1_synth_bzero(emu, sp->block, offset, blocksize - offset); in snd_emu10k1_sample_new()
162 if (sp->v.mode_flags & SNDRV_SFNT_SAMPLE_NO_BLANK) { in snd_emu10k1_sample_new()
164 if (sp->v.mode_flags & SNDRV_SFNT_SAMPLE_SINGLESHOT) { in snd_emu10k1_sample_new()
165 sp->v.loopstart = sp->v.end + BLANK_LOOP_START; in snd_emu10k1_sample_new()
166 sp->v.loopend = sp->v.end + BLANK_LOOP_END; in snd_emu10k1_sample_new()
171 if (sp->v.mode_flags & SNDRV_SFNT_SAMPLE_UNSIGNED) { in snd_emu10k1_sample_new()
173 if (! (sp->v.mode_flags & SNDRV_SFNT_SAMPLE_8BITS)) { in snd_emu10k1_sample_new()
186 if (! (sp->v.mode_flags & SNDRV_SFNT_SAMPLE_8BITS)) in snd_emu10k1_sample_new()
188 sp->v.start += start_addr; in snd_emu10k1_sample_new()
189 sp->v.end += start_addr; in snd_emu10k1_sample_new()
190 sp->v.loopstart += start_addr; in snd_emu10k1_sample_new()
191 sp->v.loopend += start_addr; in snd_emu10k1_sample_new()
200 snd_emu10k1_sample_free(struct snd_emux *rec, struct snd_sf_sample *sp, in snd_emu10k1_sample_free() argument
206 if (snd_BUG_ON(!sp || !hdr)) in snd_emu10k1_sample_free()
209 if (sp->block) { in snd_emu10k1_sample_free()
210 snd_emu10k1_synth_free(emu, sp->block); in snd_emu10k1_sample_free()
211 sp->block = NULL; in snd_emu10k1_sample_free()