gwave->format |= IWFFFF_WAVE_ROM;
gwave->address.memory = snd_LE_to_host_32(*(((unsigned int *)wave) + 8/4));
} else {
- gwave->share_id[1] = iwf->share_id1;
- gwave->share_id[2] = iwf->share_id2;
- gwave->share_id[3] = iwf->share_id3;
- gwave->share_id[4] = snd_LE_to_host_32(*(((unsigned int *)wave) + 8/4));
+ gwave->share_id[0] = iwf->share_id1;
+ gwave->share_id[1] = iwf->share_id2;
+ gwave->share_id[2] = iwf->share_id3;
+ gwave->share_id[3] = snd_LE_to_host_32(*(((unsigned int *)wave) + 8/4));
result = load_iw_wave(iwf, gwave->share_id[2], gwave->size, &gwave->address.ptr);
if (result < 0) {
free_wave(gwave);
xwave = (iwffff_xwave_t *)ptr;
ptr += sizeof(*xwave);
xwave->stype = IWFFFF_STRU_WAVE;
+ xwave->share_id[0] = __cpu_to_le32(wave->share_id[0]);
xwave->share_id[1] = __cpu_to_le32(wave->share_id[1]);
xwave->share_id[2] = __cpu_to_le32(wave->share_id[2]);
xwave->share_id[3] = __cpu_to_le32(wave->share_id[3]);
- xwave->share_id[4] = __cpu_to_le32(wave->share_id[4]);
xwave->format = __cpu_to_le32(wave->format);
xwave->size = __cpu_to_le32(wave->size);
xwave->start = __cpu_to_le32(wave->start);
if (!pcm->setup)
return -EBADFD;
memset(params, 0, snd_pcm_hw_params_sizeof());
- snd_mask_copy(¶ms->masks[SND_PCM_HW_PARAM_ACCESS], (snd_mask_t *)&pcm->access);
- snd_mask_copy(¶ms->masks[SND_PCM_HW_PARAM_FORMAT], (snd_mask_t *)&pcm->format);
- snd_mask_copy(¶ms->masks[SND_PCM_HW_PARAM_SUBFORMAT], (snd_mask_t *)&pcm->subformat);
+ snd_mask_copy(¶ms->masks[SND_PCM_HW_PARAM_ACCESS - SNDRV_PCM_HW_PARAM_FIRST_MASK], (snd_mask_t *)&pcm->access);
+ snd_mask_copy(¶ms->masks[SND_PCM_HW_PARAM_FORMAT - SNDRV_PCM_HW_PARAM_FIRST_MASK], (snd_mask_t *)&pcm->format);
+ snd_mask_copy(¶ms->masks[SND_PCM_HW_PARAM_SUBFORMAT - SNDRV_PCM_HW_PARAM_FIRST_MASK], (snd_mask_t *)&pcm->subformat);
frame_bits = snd_pcm_format_physical_width(pcm->format) * pcm->channels;
- snd_interval_set_value(¶ms->intervals[SND_PCM_HW_PARAM_FRAME_BITS], frame_bits);
- snd_interval_set_value(¶ms->intervals[SND_PCM_HW_PARAM_CHANNELS], pcm->channels);
- snd_interval_set_value(¶ms->intervals[SND_PCM_HW_PARAM_RATE], pcm->rate);
- snd_interval_set_value(¶ms->intervals[SND_PCM_HW_PARAM_PERIOD_TIME], pcm->period_time);
- snd_interval_set_value(¶ms->intervals[SND_PCM_HW_PARAM_PERIOD_SIZE], pcm->period_size);
- snd_interval_copy(¶ms->intervals[SND_PCM_HW_PARAM_PERIODS], &pcm->periods);
- snd_interval_copy(¶ms->intervals[SND_PCM_HW_PARAM_BUFFER_TIME], &pcm->buffer_time);
- snd_interval_set_value(¶ms->intervals[SND_PCM_HW_PARAM_BUFFER_SIZE], pcm->buffer_size);
- snd_interval_set_value(¶ms->intervals[SND_PCM_HW_PARAM_BUFFER_BYTES], (pcm->buffer_size * frame_bits) / 8);
- snd_interval_set_value(¶ms->intervals[SND_PCM_HW_PARAM_TICK_TIME], pcm->tick_time);
+ snd_interval_set_value(¶ms->intervals[SND_PCM_HW_PARAM_FRAME_BITS - SNDRV_PCM_HW_PARAM_FIRST_INTERVAL], frame_bits);
+ snd_interval_set_value(¶ms->intervals[SND_PCM_HW_PARAM_CHANNELS - SNDRV_PCM_HW_PARAM_FIRST_INTERVAL], pcm->channels);
+ snd_interval_set_value(¶ms->intervals[SND_PCM_HW_PARAM_RATE - SNDRV_PCM_HW_PARAM_FIRST_INTERVAL], pcm->rate);
+ snd_interval_set_value(¶ms->intervals[SND_PCM_HW_PARAM_PERIOD_TIME - SNDRV_PCM_HW_PARAM_FIRST_INTERVAL], pcm->period_time);
+ snd_interval_set_value(¶ms->intervals[SND_PCM_HW_PARAM_PERIOD_SIZE - SNDRV_PCM_HW_PARAM_FIRST_INTERVAL], pcm->period_size);
+ snd_interval_copy(¶ms->intervals[SND_PCM_HW_PARAM_PERIODS - SNDRV_PCM_HW_PARAM_FIRST_INTERVAL], &pcm->periods);
+ snd_interval_copy(¶ms->intervals[SND_PCM_HW_PARAM_BUFFER_TIME - SNDRV_PCM_HW_PARAM_FIRST_INTERVAL], &pcm->buffer_time);
+ snd_interval_set_value(¶ms->intervals[SND_PCM_HW_PARAM_BUFFER_SIZE - SNDRV_PCM_HW_PARAM_FIRST_INTERVAL], pcm->buffer_size);
+ snd_interval_set_value(¶ms->intervals[SND_PCM_HW_PARAM_BUFFER_BYTES - SNDRV_PCM_HW_PARAM_FIRST_INTERVAL], (pcm->buffer_size * frame_bits) / 8);
+ snd_interval_set_value(¶ms->intervals[SND_PCM_HW_PARAM_TICK_TIME - SNDRV_PCM_HW_PARAM_FIRST_INTERVAL], pcm->tick_time);
params->info = pcm->info;
params->msbits = pcm->msbits;
params->rate_num = pcm->rate_num;
*/
snd_pcm_t *snd_async_handler_get_pcm(snd_async_handler_t *handler)
{
- assert(handler->type = SND_ASYNC_HANDLER_PCM);
+ assert(handler->type == SND_ASYNC_HANDLER_PCM);
return handler->u.pcm;
}