Lines Matching refs:header

783 wavefront_send_patch (snd_wavefront_t *dev, wavefront_patch_info *header)  in wavefront_send_patch()  argument
790 header->number); in wavefront_send_patch()
792 if (header->number >= ARRAY_SIZE(dev->patch_status)) in wavefront_send_patch()
795 dev->patch_status[header->number] |= WF_SLOT_FILLED; in wavefront_send_patch()
797 bptr = munge_int32 (header->number, buf, 2); in wavefront_send_patch()
798 munge_buf ((unsigned char *)&header->hdr.p, bptr, WF_PATCH_BYTES); in wavefront_send_patch()
809 wavefront_send_program (snd_wavefront_t *dev, wavefront_patch_info *header) in wavefront_send_program() argument
816 header->number); in wavefront_send_program()
818 if (header->number >= ARRAY_SIZE(dev->prog_status)) in wavefront_send_program()
821 dev->prog_status[header->number] = WF_SLOT_USED; in wavefront_send_program()
828 if (header->hdr.pr.layer[i].mute) { in wavefront_send_program()
829 dev->patch_status[header->hdr.pr.layer[i].patch_number] |= in wavefront_send_program()
838 buf[0] = header->number; in wavefront_send_program()
839 munge_buf ((unsigned char *)&header->hdr.pr, &buf[1], WF_PROGRAM_BYTES); in wavefront_send_program()
865 wavefront_patch_info *header, in wavefront_send_sample() argument
895 header->size ? "" : "header ", in wavefront_send_sample()
896 header->number, header->subkey, in wavefront_send_sample()
897 header->size, in wavefront_send_sample()
898 (unsigned long) header->dataptr); in wavefront_send_sample()
900 if (header->number == WAVEFRONT_FIND_FREE_SAMPLE_SLOT) { in wavefront_send_sample()
907 header->number = x; in wavefront_send_sample()
910 if (header->number >= WF_MAX_SAMPLE) in wavefront_send_sample()
913 if (header->size) { in wavefront_send_sample()
939 if (dev->sample_status[header->number] & WF_SLOT_ROM) { in wavefront_send_sample()
942 header->number); in wavefront_send_sample()
947 wavefront_delete_sample (dev, header->number); in wavefront_send_sample()
950 if (header->size) { in wavefront_send_sample()
953 if (dev->freemem < (int)header->size) { in wavefront_send_sample()
956 header->size); in wavefront_send_sample()
962 skip = WF_GET_CHANNEL(&header->hdr.s); in wavefront_send_sample()
964 if (skip > 0 && header->hdr.s.SampleResolution != LINEAR_16BIT) { in wavefront_send_sample()
1003 WF_GET_CHANNEL (&header->hdr.s), in wavefront_send_sample()
1008 WF_SET_CHANNEL(&header->hdr.s, 0); in wavefront_send_sample()
1015 length = header->size / 2; in wavefront_send_sample()
1024 shptr = munge_int32 (header->number, shptr, 2); in wavefront_send_sample()
1026 if (header->size) { in wavefront_send_sample()
1034 shptr = munge_int32 (*((u32 *) &header->hdr.s.sampleStartOffset), in wavefront_send_sample()
1036 shptr = munge_int32 (*((u32 *) &header->hdr.s.loopStartOffset), in wavefront_send_sample()
1038 shptr = munge_int32 (*((u32 *) &header->hdr.s.loopEndOffset), in wavefront_send_sample()
1040 shptr = munge_int32 (*((u32 *) &header->hdr.s.sampleEndOffset), in wavefront_send_sample()
1048 shptr = munge_int32 (header->hdr.s.FrequencyBias, shptr, 3); in wavefront_send_sample()
1055 shptr = munge_int32 (*(&header->hdr.s.FrequencyBias+1), in wavefront_send_sample()
1059 header->size ? in wavefront_send_sample()
1063 header->size ? "" : "header "); in wavefront_send_sample()
1067 if (header->size == 0) { in wavefront_send_sample()
1102 if (WF_SAMPLE_IS_8BIT(&header->hdr.s)) { in wavefront_send_sample()
1161 dev->sample_status[header->number] = (WF_SLOT_FILLED|WF_ST_SAMPLE); in wavefront_send_sample()
1172 wavefront_send_alias (snd_wavefront_t *dev, wavefront_patch_info *header) in wavefront_send_alias() argument
1179 header->number, in wavefront_send_alias()
1180 header->hdr.a.OriginalSample); in wavefront_send_alias()
1182 if (header->number >= WF_MAX_SAMPLE) in wavefront_send_alias()
1185 munge_int32 (header->number, &alias_hdr[0], 2); in wavefront_send_alias()
1186 munge_int32 (header->hdr.a.OriginalSample, &alias_hdr[2], 2); in wavefront_send_alias()
1187 munge_int32 (*((unsigned int *)&header->hdr.a.sampleStartOffset), in wavefront_send_alias()
1189 munge_int32 (*((unsigned int *)&header->hdr.a.loopStartOffset), in wavefront_send_alias()
1191 munge_int32 (*((unsigned int *)&header->hdr.a.loopEndOffset), in wavefront_send_alias()
1193 munge_int32 (*((unsigned int *)&header->hdr.a.sampleEndOffset), in wavefront_send_alias()
1195 munge_int32 (header->hdr.a.FrequencyBias, &alias_hdr[20], 3); in wavefront_send_alias()
1196 munge_int32 (*(&header->hdr.a.FrequencyBias+1), &alias_hdr[23], 2); in wavefront_send_alias()
1203 dev->sample_status[header->number] = (WF_SLOT_FILLED|WF_ST_ALIAS); in wavefront_send_alias()
1209 wavefront_send_multisample (snd_wavefront_t *dev, wavefront_patch_info *header) in wavefront_send_multisample() argument
1215 if (header->number >= WF_MAX_SAMPLE) in wavefront_send_multisample()
1222 munge_int32 (header->number, &msample_hdr[0], 2); in wavefront_send_multisample()
1229 num_samples = (1<<(header->hdr.ms.NumberOfSamples&7)); in wavefront_send_multisample()
1230 msample_hdr[2] = (unsigned char) header->hdr.ms.NumberOfSamples; in wavefront_send_multisample()
1233 header->number, in wavefront_send_multisample()
1234 header->hdr.ms.NumberOfSamples, in wavefront_send_multisample()
1239 i, header->hdr.ms.SampleNumber[i]); in wavefront_send_multisample()
1240 munge_int32 (header->hdr.ms.SampleNumber[i], in wavefront_send_multisample()
1257 dev->sample_status[header->number] = (WF_SLOT_FILLED|WF_ST_MULTISAMPLE); in wavefront_send_multisample()
1265 wavefront_patch_info *header) in wavefront_fetch_multisample() argument
1272 munge_int32 (header->number, number, 2); in wavefront_fetch_multisample()
1280 header->number, log_ns[0]); in wavefront_fetch_multisample()
1282 header->hdr.ms.NumberOfSamples = log_ns[0]; in wavefront_fetch_multisample()
1308 header->hdr.ms.SampleNumber[i] = in wavefront_fetch_multisample()
1312 i, header->hdr.ms.SampleNumber[i]); in wavefront_fetch_multisample()
1320 wavefront_send_drum (snd_wavefront_t *dev, wavefront_patch_info *header) in wavefront_send_drum() argument
1324 wavefront_drum *drum = &header->hdr.d; in wavefront_send_drum()
1329 header->number, drum->PatchNumber); in wavefront_send_drum()
1331 drumbuf[0] = header->number & 0x7f; in wavefront_send_drum()
1380 wavefront_patch_info *header; in wavefront_load_patch() local
1383 header = kmalloc(sizeof(*header), GFP_KERNEL); in wavefront_load_patch()
1384 if (! header) in wavefront_load_patch()
1387 if (copy_from_user (header, addr, sizeof(wavefront_patch_info) - in wavefront_load_patch()
1398 header->subkey, in wavefront_load_patch()
1399 header->number, in wavefront_load_patch()
1400 header->size); in wavefront_load_patch()
1402 switch (header->subkey) { in wavefront_load_patch()
1405 if (copy_from_user (&header->hdr.s, header->hdrptr, in wavefront_load_patch()
1411 err = wavefront_send_sample (dev, header, header->dataptr, 0); in wavefront_load_patch()
1416 if (copy_from_user (&header->hdr.s, header->hdrptr, in wavefront_load_patch()
1422 err = wavefront_send_multisample (dev, header); in wavefront_load_patch()
1427 if (copy_from_user (&header->hdr.a, header->hdrptr, in wavefront_load_patch()
1433 err = wavefront_send_alias (dev, header); in wavefront_load_patch()
1437 if (copy_from_user (&header->hdr.d, header->hdrptr, in wavefront_load_patch()
1443 err = wavefront_send_drum (dev, header); in wavefront_load_patch()
1447 if (copy_from_user (&header->hdr.p, header->hdrptr, in wavefront_load_patch()
1453 err = wavefront_send_patch (dev, header); in wavefront_load_patch()
1457 if (copy_from_user (&header->hdr.pr, header->hdrptr, in wavefront_load_patch()
1463 err = wavefront_send_program (dev, header); in wavefront_load_patch()
1468 header->subkey); in wavefront_load_patch()
1474 kfree(header); in wavefront_load_patch()