Lines Matching refs:header
188 { WFC_DOWNLOAD_SAMPLE_HEADER, "download sample header",
190 { WFC_UPLOAD_SAMPLE_HEADER, "upload sample header", 13, 2, 0 },
779 wavefront_send_patch (snd_wavefront_t *dev, wavefront_patch_info *header)
786 header->number);
788 dev->patch_status[header->number] |= WF_SLOT_FILLED;
791 bptr = munge_int32 (header->number, buf, 2);
792 munge_buf ((unsigned char *)&header->hdr.p, bptr, WF_PATCH_BYTES);
803 wavefront_send_program (snd_wavefront_t *dev, wavefront_patch_info *header)
810 header->number);
812 dev->prog_status[header->number] = WF_SLOT_USED;
816 if (header->hdr.pr.layer[i].mute) {
817 dev->patch_status[header->hdr.pr.layer[i].patch_number] |=
823 buf[0] = header->number;
824 munge_buf ((unsigned char *)&header->hdr.pr, &buf[1], WF_PROGRAM_BYTES);
850 wavefront_patch_info *header,
880 header->size ? "" : "header ",
881 header->number, header->subkey,
882 header->size,
883 (unsigned long) header->dataptr);
885 if (header->number == WAVEFRONT_FIND_FREE_SAMPLE_SLOT) {
892 header->number = x;
895 if (header->size) {
899 if (dev->sample_status[header->number] & WF_SLOT_ROM) {
902 header->number);
907 wavefront_delete_sample (dev, header->number);
910 if (header->size) {
913 if (dev->freemem < (int)header->size) {
916 header->size);
922 skip = WF_GET_CHANNEL(&header->hdr.s);
924 if (skip > 0 && header->hdr.s.SampleResolution != LINEAR_16BIT) {
963 WF_GET_CHANNEL (&header->hdr.s),
968 WF_SET_CHANNEL(&header->hdr.s, 0);
975 length = header->size / 2;
978 header we have to send isn't just a munged copy either.
979 so, build the sample header right here.
984 shptr = munge_int32 (header->number, shptr, 2);
986 if (header->size) {
994 shptr = munge_int32 (*((u32 *) &header->hdr.s.sampleStartOffset),
996 shptr = munge_int32 (*((u32 *) &header->hdr.s.loopStartOffset),
998 shptr = munge_int32 (*((u32 *) &header->hdr.s.loopEndOffset),
1000 shptr = munge_int32 (*((u32 *) &header->hdr.s.sampleEndOffset),
1008 shptr = munge_int32 (header->hdr.s.FrequencyBias, shptr, 3);
1015 shptr = munge_int32 (*(&header->hdr.s.FrequencyBias+1),
1019 header->size ?
1023 header->size ? "" : "header ");
1027 if (header->size == 0) {
1062 if (WF_SAMPLE_IS_8BIT(&header->hdr.s)) {
1120 dev->sample_status[header->number] = (WF_SLOT_FILLED|WF_ST_SAMPLE);
1122 /* Note, label is here because sending the sample header shouldn't
1131 wavefront_send_alias (snd_wavefront_t *dev, wavefront_patch_info *header)
1138 header->number,
1139 header->hdr.a.OriginalSample);
1141 munge_int32 (header->number, &alias_hdr[0], 2);
1142 munge_int32 (header->hdr.a.OriginalSample, &alias_hdr[2], 2);
1143 munge_int32 (*((unsigned int *)&header->hdr.a.sampleStartOffset),
1145 munge_int32 (*((unsigned int *)&header->hdr.a.loopStartOffset),
1147 munge_int32 (*((unsigned int *)&header->hdr.a.loopEndOffset),
1149 munge_int32 (*((unsigned int *)&header->hdr.a.sampleEndOffset),
1151 munge_int32 (header->hdr.a.FrequencyBias, &alias_hdr[20], 3);
1152 munge_int32 (*(&header->hdr.a.FrequencyBias+1), &alias_hdr[23], 2);
1159 dev->sample_status[header->number] = (WF_SLOT_FILLED|WF_ST_ALIAS);
1165 wavefront_send_multisample (snd_wavefront_t *dev, wavefront_patch_info *header)
1175 munge_int32 (header->number, &msample_hdr[0], 2);
1182 num_samples = (1<<(header->hdr.ms.NumberOfSamples&7));
1183 msample_hdr[2] = (unsigned char) header->hdr.ms.NumberOfSamples;
1186 header->number,
1187 header->hdr.ms.NumberOfSamples,
1192 i, header->hdr.ms.SampleNumber[i]);
1193 munge_int32 (header->hdr.ms.SampleNumber[i],
1210 dev->sample_status[header->number] = (WF_SLOT_FILLED|WF_ST_MULTISAMPLE);
1218 wavefront_patch_info *header)
1225 munge_int32 (header->number, number, 2);
1233 header->number, log_ns[0]);
1235 header->hdr.ms.NumberOfSamples = log_ns[0];
1259 header->hdr.ms.SampleNumber[i] =
1263 i, header->hdr.ms.SampleNumber[i]);
1271 wavefront_send_drum (snd_wavefront_t *dev, wavefront_patch_info *header)
1275 wavefront_drum *drum = &header->hdr.d;
1280 header->number, drum->PatchNumber);
1282 drumbuf[0] = header->number & 0x7f;
1315 wavefront_patch_info *header;
1318 header = kmalloc(sizeof(*header), GFP_KERNEL);
1319 if (! header)
1322 if (copy_from_user (header, addr, sizeof(wavefront_patch_info) -
1333 header->subkey,
1334 header->number,
1335 header->size);
1337 switch (header->subkey) {
1340 if (copy_from_user (&header->hdr.s, header->hdrptr,
1346 err = wavefront_send_sample (dev, header, header->dataptr, 0);
1351 if (copy_from_user (&header->hdr.s, header->hdrptr,
1357 err = wavefront_send_multisample (dev, header);
1362 if (copy_from_user (&header->hdr.a, header->hdrptr,
1368 err = wavefront_send_alias (dev, header);
1372 if (copy_from_user (&header->hdr.d, header->hdrptr,
1378 err = wavefront_send_drum (dev, header);
1382 if (copy_from_user (&header->hdr.p, header->hdrptr,
1388 err = wavefront_send_patch (dev, header);
1392 if (copy_from_user (&header->hdr.pr, header->hdrptr,
1398 err = wavefront_send_program (dev, header);
1403 header->subkey);
1409 kfree(header);
1772 compatible header as the serial MIDI source