Lines Matching refs:header

781 wavefront_send_patch (snd_wavefront_t *dev, wavefront_patch_info *header)  in wavefront_send_patch()  argument
788 header->number); in wavefront_send_patch()
790 if (header->number >= ARRAY_SIZE(dev->patch_status)) in wavefront_send_patch()
793 dev->patch_status[header->number] |= WF_SLOT_FILLED; in wavefront_send_patch()
795 bptr = munge_int32 (header->number, buf, 2); in wavefront_send_patch()
796 munge_buf ((unsigned char *)&header->hdr.p, bptr, WF_PATCH_BYTES); in wavefront_send_patch()
807 wavefront_send_program (snd_wavefront_t *dev, wavefront_patch_info *header) in wavefront_send_program() argument
814 header->number); in wavefront_send_program()
816 if (header->number >= ARRAY_SIZE(dev->prog_status)) in wavefront_send_program()
819 dev->prog_status[header->number] = WF_SLOT_USED; in wavefront_send_program()
826 if (header->hdr.pr.layer[i].mute) { in wavefront_send_program()
827 dev->patch_status[header->hdr.pr.layer[i].patch_number] |= in wavefront_send_program()
836 buf[0] = header->number; in wavefront_send_program()
837 munge_buf ((unsigned char *)&header->hdr.pr, &buf[1], WF_PROGRAM_BYTES); in wavefront_send_program()
863 wavefront_patch_info *header, in wavefront_send_sample() argument
893 header->size ? "" : "header ", in wavefront_send_sample()
894 header->number, header->subkey, in wavefront_send_sample()
895 header->size, in wavefront_send_sample()
896 (unsigned long) header->dataptr); in wavefront_send_sample()
898 if (header->number == WAVEFRONT_FIND_FREE_SAMPLE_SLOT) { in wavefront_send_sample()
905 header->number = x; in wavefront_send_sample()
908 if (header->number >= WF_MAX_SAMPLE) in wavefront_send_sample()
911 if (header->size) { in wavefront_send_sample()
937 if (dev->sample_status[header->number] & WF_SLOT_ROM) { in wavefront_send_sample()
940 header->number); in wavefront_send_sample()
945 wavefront_delete_sample (dev, header->number); in wavefront_send_sample()
948 if (header->size) { in wavefront_send_sample()
951 if (dev->freemem < (int)header->size) { in wavefront_send_sample()
954 header->size); in wavefront_send_sample()
960 skip = WF_GET_CHANNEL(&header->hdr.s); in wavefront_send_sample()
962 if (skip > 0 && header->hdr.s.SampleResolution != LINEAR_16BIT) { in wavefront_send_sample()
1001 WF_GET_CHANNEL (&header->hdr.s), in wavefront_send_sample()
1006 WF_SET_CHANNEL(&header->hdr.s, 0); in wavefront_send_sample()
1013 length = header->size / 2; in wavefront_send_sample()
1022 shptr = munge_int32 (header->number, shptr, 2); in wavefront_send_sample()
1024 if (header->size) { in wavefront_send_sample()
1032 shptr = munge_int32 (*((u32 *) &header->hdr.s.sampleStartOffset), in wavefront_send_sample()
1034 shptr = munge_int32 (*((u32 *) &header->hdr.s.loopStartOffset), in wavefront_send_sample()
1036 shptr = munge_int32 (*((u32 *) &header->hdr.s.loopEndOffset), in wavefront_send_sample()
1038 shptr = munge_int32 (*((u32 *) &header->hdr.s.sampleEndOffset), in wavefront_send_sample()
1046 shptr = munge_int32 (header->hdr.s.FrequencyBias, shptr, 3); in wavefront_send_sample()
1053 shptr = munge_int32 (*(&header->hdr.s.FrequencyBias+1), in wavefront_send_sample()
1057 header->size ? in wavefront_send_sample()
1061 header->size ? "" : "header "); in wavefront_send_sample()
1065 if (header->size == 0) { in wavefront_send_sample()
1101 if (WF_SAMPLE_IS_8BIT(&header->hdr.s)) { in wavefront_send_sample()
1160 dev->sample_status[header->number] = (WF_SLOT_FILLED|WF_ST_SAMPLE); in wavefront_send_sample()
1171 wavefront_send_alias (snd_wavefront_t *dev, wavefront_patch_info *header) in wavefront_send_alias() argument
1178 header->number, in wavefront_send_alias()
1179 header->hdr.a.OriginalSample); in wavefront_send_alias()
1181 if (header->number >= WF_MAX_SAMPLE) in wavefront_send_alias()
1184 munge_int32 (header->number, &alias_hdr[0], 2); in wavefront_send_alias()
1185 munge_int32 (header->hdr.a.OriginalSample, &alias_hdr[2], 2); in wavefront_send_alias()
1186 munge_int32 (*((unsigned int *)&header->hdr.a.sampleStartOffset), in wavefront_send_alias()
1188 munge_int32 (*((unsigned int *)&header->hdr.a.loopStartOffset), in wavefront_send_alias()
1190 munge_int32 (*((unsigned int *)&header->hdr.a.loopEndOffset), in wavefront_send_alias()
1192 munge_int32 (*((unsigned int *)&header->hdr.a.sampleEndOffset), in wavefront_send_alias()
1194 munge_int32 (header->hdr.a.FrequencyBias, &alias_hdr[20], 3); in wavefront_send_alias()
1195 munge_int32 (*(&header->hdr.a.FrequencyBias+1), &alias_hdr[23], 2); in wavefront_send_alias()
1202 dev->sample_status[header->number] = (WF_SLOT_FILLED|WF_ST_ALIAS); in wavefront_send_alias()
1208 wavefront_send_multisample (snd_wavefront_t *dev, wavefront_patch_info *header) in wavefront_send_multisample() argument
1214 if (header->number >= WF_MAX_SAMPLE) in wavefront_send_multisample()
1221 munge_int32 (header->number, &msample_hdr[0], 2); in wavefront_send_multisample()
1228 num_samples = (1<<(header->hdr.ms.NumberOfSamples&7)); in wavefront_send_multisample()
1229 msample_hdr[2] = (unsigned char) header->hdr.ms.NumberOfSamples; in wavefront_send_multisample()
1232 header->number, in wavefront_send_multisample()
1233 header->hdr.ms.NumberOfSamples, in wavefront_send_multisample()
1238 i, header->hdr.ms.SampleNumber[i]); in wavefront_send_multisample()
1239 munge_int32 (header->hdr.ms.SampleNumber[i], in wavefront_send_multisample()
1256 dev->sample_status[header->number] = (WF_SLOT_FILLED|WF_ST_MULTISAMPLE); in wavefront_send_multisample()
1264 wavefront_patch_info *header) in wavefront_fetch_multisample() argument
1271 munge_int32 (header->number, number, 2); in wavefront_fetch_multisample()
1279 header->number, log_ns[0]); in wavefront_fetch_multisample()
1281 header->hdr.ms.NumberOfSamples = log_ns[0]; in wavefront_fetch_multisample()
1307 header->hdr.ms.SampleNumber[i] = in wavefront_fetch_multisample()
1311 i, header->hdr.ms.SampleNumber[i]); in wavefront_fetch_multisample()
1319 wavefront_send_drum (snd_wavefront_t *dev, wavefront_patch_info *header) in wavefront_send_drum() argument
1323 wavefront_drum *drum = &header->hdr.d; in wavefront_send_drum()
1328 header->number, drum->PatchNumber); in wavefront_send_drum()
1330 drumbuf[0] = header->number & 0x7f; in wavefront_send_drum()
1379 wavefront_patch_info *header; in wavefront_load_patch() local
1382 header = kmalloc(sizeof(*header), GFP_KERNEL); in wavefront_load_patch()
1383 if (! header) in wavefront_load_patch()
1386 if (copy_from_user (header, addr, sizeof(wavefront_patch_info) - in wavefront_load_patch()
1397 header->subkey, in wavefront_load_patch()
1398 header->number, in wavefront_load_patch()
1399 header->size); in wavefront_load_patch()
1401 switch (header->subkey) { in wavefront_load_patch()
1404 if (copy_from_user (&header->hdr.s, header->hdrptr, in wavefront_load_patch()
1410 err = wavefront_send_sample (dev, header, header->dataptr, 0); in wavefront_load_patch()
1415 if (copy_from_user (&header->hdr.s, header->hdrptr, in wavefront_load_patch()
1421 err = wavefront_send_multisample (dev, header); in wavefront_load_patch()
1426 if (copy_from_user (&header->hdr.a, header->hdrptr, in wavefront_load_patch()
1432 err = wavefront_send_alias (dev, header); in wavefront_load_patch()
1436 if (copy_from_user (&header->hdr.d, header->hdrptr, in wavefront_load_patch()
1442 err = wavefront_send_drum (dev, header); in wavefront_load_patch()
1446 if (copy_from_user (&header->hdr.p, header->hdrptr, in wavefront_load_patch()
1452 err = wavefront_send_patch (dev, header); in wavefront_load_patch()
1456 if (copy_from_user (&header->hdr.pr, header->hdrptr, in wavefront_load_patch()
1462 err = wavefront_send_program (dev, header); in wavefront_load_patch()
1467 header->subkey); in wavefront_load_patch()
1473 kfree(header); in wavefront_load_patch()