Lines Matching refs:header
777 wavefront_send_patch (snd_wavefront_t *dev, wavefront_patch_info *header) in wavefront_send_patch() argument
784 header->number); in wavefront_send_patch()
786 if (header->number >= ARRAY_SIZE(dev->patch_status)) in wavefront_send_patch()
789 dev->patch_status[header->number] |= WF_SLOT_FILLED; in wavefront_send_patch()
791 bptr = munge_int32 (header->number, buf, 2); in wavefront_send_patch()
792 munge_buf ((unsigned char *)&header->hdr.p, bptr, WF_PATCH_BYTES); in wavefront_send_patch()
803 wavefront_send_program (snd_wavefront_t *dev, wavefront_patch_info *header) in wavefront_send_program() argument
810 header->number); in wavefront_send_program()
812 if (header->number >= ARRAY_SIZE(dev->prog_status)) in wavefront_send_program()
815 dev->prog_status[header->number] = WF_SLOT_USED; in wavefront_send_program()
822 if (header->hdr.pr.layer[i].mute) { in wavefront_send_program()
823 dev->patch_status[header->hdr.pr.layer[i].patch_number] |= in wavefront_send_program()
832 buf[0] = header->number; in wavefront_send_program()
833 munge_buf ((unsigned char *)&header->hdr.pr, &buf[1], WF_PROGRAM_BYTES); in wavefront_send_program()
859 wavefront_patch_info *header, in wavefront_send_sample() argument
889 header->size ? "" : "header ", in wavefront_send_sample()
890 header->number, header->subkey, in wavefront_send_sample()
891 header->size, in wavefront_send_sample()
892 (unsigned long) header->dataptr); in wavefront_send_sample()
894 if (header->number == WAVEFRONT_FIND_FREE_SAMPLE_SLOT) { in wavefront_send_sample()
901 header->number = x; in wavefront_send_sample()
904 if (header->number >= WF_MAX_SAMPLE) in wavefront_send_sample()
907 if (header->size) { in wavefront_send_sample()
933 if (dev->sample_status[header->number] & WF_SLOT_ROM) { in wavefront_send_sample()
936 header->number); in wavefront_send_sample()
941 wavefront_delete_sample (dev, header->number); in wavefront_send_sample()
944 if (header->size) { in wavefront_send_sample()
947 if (dev->freemem < (int)header->size) { in wavefront_send_sample()
950 header->size); in wavefront_send_sample()
956 skip = WF_GET_CHANNEL(&header->hdr.s); in wavefront_send_sample()
958 if (skip > 0 && header->hdr.s.SampleResolution != LINEAR_16BIT) { in wavefront_send_sample()
997 WF_GET_CHANNEL (&header->hdr.s), in wavefront_send_sample()
1002 WF_SET_CHANNEL(&header->hdr.s, 0); in wavefront_send_sample()
1009 length = header->size / 2; in wavefront_send_sample()
1018 shptr = munge_int32 (header->number, shptr, 2); in wavefront_send_sample()
1020 if (header->size) { in wavefront_send_sample()
1028 shptr = munge_int32 (*((u32 *) &header->hdr.s.sampleStartOffset), in wavefront_send_sample()
1030 shptr = munge_int32 (*((u32 *) &header->hdr.s.loopStartOffset), in wavefront_send_sample()
1032 shptr = munge_int32 (*((u32 *) &header->hdr.s.loopEndOffset), in wavefront_send_sample()
1034 shptr = munge_int32 (*((u32 *) &header->hdr.s.sampleEndOffset), in wavefront_send_sample()
1042 shptr = munge_int32 (header->hdr.s.FrequencyBias, shptr, 3); in wavefront_send_sample()
1049 shptr = munge_int32 (*(&header->hdr.s.FrequencyBias+1), in wavefront_send_sample()
1053 header->size ? in wavefront_send_sample()
1057 header->size ? "" : "header "); in wavefront_send_sample()
1061 if (header->size == 0) { in wavefront_send_sample()
1096 if (WF_SAMPLE_IS_8BIT(&header->hdr.s)) { in wavefront_send_sample()
1154 dev->sample_status[header->number] = (WF_SLOT_FILLED|WF_ST_SAMPLE); in wavefront_send_sample()
1165 wavefront_send_alias (snd_wavefront_t *dev, wavefront_patch_info *header) in wavefront_send_alias() argument
1172 header->number, in wavefront_send_alias()
1173 header->hdr.a.OriginalSample); in wavefront_send_alias()
1175 munge_int32 (header->number, &alias_hdr[0], 2); in wavefront_send_alias()
1176 munge_int32 (header->hdr.a.OriginalSample, &alias_hdr[2], 2); in wavefront_send_alias()
1177 munge_int32 (*((unsigned int *)&header->hdr.a.sampleStartOffset), in wavefront_send_alias()
1179 munge_int32 (*((unsigned int *)&header->hdr.a.loopStartOffset), in wavefront_send_alias()
1181 munge_int32 (*((unsigned int *)&header->hdr.a.loopEndOffset), in wavefront_send_alias()
1183 munge_int32 (*((unsigned int *)&header->hdr.a.sampleEndOffset), in wavefront_send_alias()
1185 munge_int32 (header->hdr.a.FrequencyBias, &alias_hdr[20], 3); in wavefront_send_alias()
1186 munge_int32 (*(&header->hdr.a.FrequencyBias+1), &alias_hdr[23], 2); in wavefront_send_alias()
1193 dev->sample_status[header->number] = (WF_SLOT_FILLED|WF_ST_ALIAS); in wavefront_send_alias()
1199 wavefront_send_multisample (snd_wavefront_t *dev, wavefront_patch_info *header) in wavefront_send_multisample() argument
1209 munge_int32 (header->number, &msample_hdr[0], 2); in wavefront_send_multisample()
1216 num_samples = (1<<(header->hdr.ms.NumberOfSamples&7)); in wavefront_send_multisample()
1217 msample_hdr[2] = (unsigned char) header->hdr.ms.NumberOfSamples; in wavefront_send_multisample()
1220 header->number, in wavefront_send_multisample()
1221 header->hdr.ms.NumberOfSamples, in wavefront_send_multisample()
1226 i, header->hdr.ms.SampleNumber[i]); in wavefront_send_multisample()
1227 munge_int32 (header->hdr.ms.SampleNumber[i], in wavefront_send_multisample()
1244 dev->sample_status[header->number] = (WF_SLOT_FILLED|WF_ST_MULTISAMPLE); in wavefront_send_multisample()
1252 wavefront_patch_info *header) in wavefront_fetch_multisample() argument
1259 munge_int32 (header->number, number, 2); in wavefront_fetch_multisample()
1267 header->number, log_ns[0]); in wavefront_fetch_multisample()
1269 header->hdr.ms.NumberOfSamples = log_ns[0]; in wavefront_fetch_multisample()
1293 header->hdr.ms.SampleNumber[i] = in wavefront_fetch_multisample()
1297 i, header->hdr.ms.SampleNumber[i]); in wavefront_fetch_multisample()
1305 wavefront_send_drum (snd_wavefront_t *dev, wavefront_patch_info *header) in wavefront_send_drum() argument
1309 wavefront_drum *drum = &header->hdr.d; in wavefront_send_drum()
1314 header->number, drum->PatchNumber); in wavefront_send_drum()
1316 drumbuf[0] = header->number & 0x7f; in wavefront_send_drum()
1365 wavefront_patch_info *header; in wavefront_load_patch() local
1368 header = kmalloc(sizeof(*header), GFP_KERNEL); in wavefront_load_patch()
1369 if (! header) in wavefront_load_patch()
1372 if (copy_from_user (header, addr, sizeof(wavefront_patch_info) - in wavefront_load_patch()
1383 header->subkey, in wavefront_load_patch()
1384 header->number, in wavefront_load_patch()
1385 header->size); in wavefront_load_patch()
1387 switch (header->subkey) { in wavefront_load_patch()
1390 if (copy_from_user (&header->hdr.s, header->hdrptr, in wavefront_load_patch()
1396 err = wavefront_send_sample (dev, header, header->dataptr, 0); in wavefront_load_patch()
1401 if (copy_from_user (&header->hdr.s, header->hdrptr, in wavefront_load_patch()
1407 err = wavefront_send_multisample (dev, header); in wavefront_load_patch()
1412 if (copy_from_user (&header->hdr.a, header->hdrptr, in wavefront_load_patch()
1418 err = wavefront_send_alias (dev, header); in wavefront_load_patch()
1422 if (copy_from_user (&header->hdr.d, header->hdrptr, in wavefront_load_patch()
1428 err = wavefront_send_drum (dev, header); in wavefront_load_patch()
1432 if (copy_from_user (&header->hdr.p, header->hdrptr, in wavefront_load_patch()
1438 err = wavefront_send_patch (dev, header); in wavefront_load_patch()
1442 if (copy_from_user (&header->hdr.pr, header->hdrptr, in wavefront_load_patch()
1448 err = wavefront_send_program (dev, header); in wavefront_load_patch()
1453 header->subkey); in wavefront_load_patch()
1459 kfree(header); in wavefront_load_patch()