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()
1097 if (WF_SAMPLE_IS_8BIT(&header->hdr.s)) { in wavefront_send_sample()
1155 dev->sample_status[header->number] = (WF_SLOT_FILLED|WF_ST_SAMPLE); in wavefront_send_sample()
1166 wavefront_send_alias (snd_wavefront_t *dev, wavefront_patch_info *header) in wavefront_send_alias() argument
1173 header->number, in wavefront_send_alias()
1174 header->hdr.a.OriginalSample); in wavefront_send_alias()
1176 if (header->number >= WF_MAX_SAMPLE) in wavefront_send_alias()
1179 munge_int32 (header->number, &alias_hdr[0], 2); in wavefront_send_alias()
1180 munge_int32 (header->hdr.a.OriginalSample, &alias_hdr[2], 2); in wavefront_send_alias()
1181 munge_int32 (*((unsigned int *)&header->hdr.a.sampleStartOffset), in wavefront_send_alias()
1183 munge_int32 (*((unsigned int *)&header->hdr.a.loopStartOffset), in wavefront_send_alias()
1185 munge_int32 (*((unsigned int *)&header->hdr.a.loopEndOffset), in wavefront_send_alias()
1187 munge_int32 (*((unsigned int *)&header->hdr.a.sampleEndOffset), in wavefront_send_alias()
1189 munge_int32 (header->hdr.a.FrequencyBias, &alias_hdr[20], 3); in wavefront_send_alias()
1190 munge_int32 (*(&header->hdr.a.FrequencyBias+1), &alias_hdr[23], 2); in wavefront_send_alias()
1197 dev->sample_status[header->number] = (WF_SLOT_FILLED|WF_ST_ALIAS); in wavefront_send_alias()
1203 wavefront_send_multisample (snd_wavefront_t *dev, wavefront_patch_info *header) in wavefront_send_multisample() argument
1209 if (header->number >= WF_MAX_SAMPLE) in wavefront_send_multisample()
1216 munge_int32 (header->number, &msample_hdr[0], 2); in wavefront_send_multisample()
1223 num_samples = (1<<(header->hdr.ms.NumberOfSamples&7)); in wavefront_send_multisample()
1224 msample_hdr[2] = (unsigned char) header->hdr.ms.NumberOfSamples; in wavefront_send_multisample()
1227 header->number, in wavefront_send_multisample()
1228 header->hdr.ms.NumberOfSamples, in wavefront_send_multisample()
1233 i, header->hdr.ms.SampleNumber[i]); in wavefront_send_multisample()
1234 munge_int32 (header->hdr.ms.SampleNumber[i], in wavefront_send_multisample()
1251 dev->sample_status[header->number] = (WF_SLOT_FILLED|WF_ST_MULTISAMPLE); in wavefront_send_multisample()
1259 wavefront_patch_info *header) in wavefront_fetch_multisample() argument
1266 munge_int32 (header->number, number, 2); in wavefront_fetch_multisample()
1274 header->number, log_ns[0]); in wavefront_fetch_multisample()
1276 header->hdr.ms.NumberOfSamples = log_ns[0]; in wavefront_fetch_multisample()
1300 header->hdr.ms.SampleNumber[i] = in wavefront_fetch_multisample()
1304 i, header->hdr.ms.SampleNumber[i]); in wavefront_fetch_multisample()
1312 wavefront_send_drum (snd_wavefront_t *dev, wavefront_patch_info *header) in wavefront_send_drum() argument
1316 wavefront_drum *drum = &header->hdr.d; in wavefront_send_drum()
1321 header->number, drum->PatchNumber); in wavefront_send_drum()
1323 drumbuf[0] = header->number & 0x7f; in wavefront_send_drum()
1372 wavefront_patch_info *header; in wavefront_load_patch() local
1375 header = kmalloc(sizeof(*header), GFP_KERNEL); in wavefront_load_patch()
1376 if (! header) in wavefront_load_patch()
1379 if (copy_from_user (header, addr, sizeof(wavefront_patch_info) - in wavefront_load_patch()
1390 header->subkey, in wavefront_load_patch()
1391 header->number, in wavefront_load_patch()
1392 header->size); in wavefront_load_patch()
1394 switch (header->subkey) { in wavefront_load_patch()
1397 if (copy_from_user (&header->hdr.s, header->hdrptr, in wavefront_load_patch()
1403 err = wavefront_send_sample (dev, header, header->dataptr, 0); in wavefront_load_patch()
1408 if (copy_from_user (&header->hdr.s, header->hdrptr, in wavefront_load_patch()
1414 err = wavefront_send_multisample (dev, header); in wavefront_load_patch()
1419 if (copy_from_user (&header->hdr.a, header->hdrptr, in wavefront_load_patch()
1425 err = wavefront_send_alias (dev, header); in wavefront_load_patch()
1429 if (copy_from_user (&header->hdr.d, header->hdrptr, in wavefront_load_patch()
1435 err = wavefront_send_drum (dev, header); in wavefront_load_patch()
1439 if (copy_from_user (&header->hdr.p, header->hdrptr, in wavefront_load_patch()
1445 err = wavefront_send_patch (dev, header); in wavefront_load_patch()
1449 if (copy_from_user (&header->hdr.pr, header->hdrptr, in wavefront_load_patch()
1455 err = wavefront_send_program (dev, header); in wavefront_load_patch()
1460 header->subkey); in wavefront_load_patch()
1466 kfree(header); in wavefront_load_patch()