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 < 0 || dev->freemem < 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()
1103 if (WF_SAMPLE_IS_8BIT(&header->hdr.s)) { in wavefront_send_sample()
1162 dev->sample_status[header->number] = (WF_SLOT_FILLED|WF_ST_SAMPLE); in wavefront_send_sample()
1173 wavefront_send_alias (snd_wavefront_t *dev, wavefront_patch_info *header) in wavefront_send_alias() argument
1180 header->number, in wavefront_send_alias()
1181 header->hdr.a.OriginalSample); in wavefront_send_alias()
1183 if (header->number >= WF_MAX_SAMPLE) in wavefront_send_alias()
1186 munge_int32 (header->number, &alias_hdr[0], 2); in wavefront_send_alias()
1187 munge_int32 (header->hdr.a.OriginalSample, &alias_hdr[2], 2); in wavefront_send_alias()
1188 munge_int32 (*((unsigned int *)&header->hdr.a.sampleStartOffset), in wavefront_send_alias()
1190 munge_int32 (*((unsigned int *)&header->hdr.a.loopStartOffset), in wavefront_send_alias()
1192 munge_int32 (*((unsigned int *)&header->hdr.a.loopEndOffset), in wavefront_send_alias()
1194 munge_int32 (*((unsigned int *)&header->hdr.a.sampleEndOffset), in wavefront_send_alias()
1196 munge_int32 (header->hdr.a.FrequencyBias, &alias_hdr[20], 3); in wavefront_send_alias()
1197 munge_int32 (*(&header->hdr.a.FrequencyBias+1), &alias_hdr[23], 2); in wavefront_send_alias()
1204 dev->sample_status[header->number] = (WF_SLOT_FILLED|WF_ST_ALIAS); in wavefront_send_alias()
1210 wavefront_send_multisample (snd_wavefront_t *dev, wavefront_patch_info *header) in wavefront_send_multisample() argument
1216 if (header->number >= WF_MAX_SAMPLE) in wavefront_send_multisample()
1223 munge_int32 (header->number, &msample_hdr[0], 2); in wavefront_send_multisample()
1230 num_samples = (1<<(header->hdr.ms.NumberOfSamples&7)); in wavefront_send_multisample()
1231 msample_hdr[2] = (unsigned char) header->hdr.ms.NumberOfSamples; in wavefront_send_multisample()
1234 header->number, in wavefront_send_multisample()
1235 header->hdr.ms.NumberOfSamples, in wavefront_send_multisample()
1240 i, header->hdr.ms.SampleNumber[i]); in wavefront_send_multisample()
1241 munge_int32 (header->hdr.ms.SampleNumber[i], in wavefront_send_multisample()
1258 dev->sample_status[header->number] = (WF_SLOT_FILLED|WF_ST_MULTISAMPLE); in wavefront_send_multisample()
1266 wavefront_patch_info *header) in wavefront_fetch_multisample() argument
1273 munge_int32 (header->number, number, 2); in wavefront_fetch_multisample()
1281 header->number, log_ns[0]); in wavefront_fetch_multisample()
1283 header->hdr.ms.NumberOfSamples = log_ns[0]; in wavefront_fetch_multisample()
1309 header->hdr.ms.SampleNumber[i] = in wavefront_fetch_multisample()
1313 i, header->hdr.ms.SampleNumber[i]); in wavefront_fetch_multisample()
1321 wavefront_send_drum (snd_wavefront_t *dev, wavefront_patch_info *header) in wavefront_send_drum() argument
1325 wavefront_drum *drum = &header->hdr.d; in wavefront_send_drum()
1330 header->number, drum->PatchNumber); in wavefront_send_drum()
1332 drumbuf[0] = header->number & 0x7f; in wavefront_send_drum()
1381 wavefront_patch_info *header; in wavefront_load_patch() local
1384 header = kmalloc_obj(*header); in wavefront_load_patch()
1385 if (! header) in wavefront_load_patch()
1388 if (copy_from_user (header, addr, sizeof(wavefront_patch_info) - in wavefront_load_patch()
1399 header->subkey, in wavefront_load_patch()
1400 header->number, in wavefront_load_patch()
1401 header->size); in wavefront_load_patch()
1403 switch (header->subkey) { in wavefront_load_patch()
1406 if (copy_from_user (&header->hdr.s, header->hdrptr, in wavefront_load_patch()
1412 err = wavefront_send_sample (dev, header, header->dataptr, 0); in wavefront_load_patch()
1417 if (copy_from_user (&header->hdr.s, header->hdrptr, in wavefront_load_patch()
1423 err = wavefront_send_multisample (dev, header); in wavefront_load_patch()
1428 if (copy_from_user (&header->hdr.a, header->hdrptr, in wavefront_load_patch()
1434 err = wavefront_send_alias (dev, header); in wavefront_load_patch()
1438 if (copy_from_user (&header->hdr.d, header->hdrptr, in wavefront_load_patch()
1444 err = wavefront_send_drum (dev, header); in wavefront_load_patch()
1448 if (copy_from_user (&header->hdr.p, header->hdrptr, in wavefront_load_patch()
1454 err = wavefront_send_patch (dev, header); in wavefront_load_patch()
1458 if (copy_from_user (&header->hdr.pr, header->hdrptr, in wavefront_load_patch()
1464 err = wavefront_send_program (dev, header); in wavefront_load_patch()
1469 header->subkey); in wavefront_load_patch()
1475 kfree(header); in wavefront_load_patch()