forked from luck/tmp_suning_uos_patched
ALSA: mips: Cleanup indirect PCM helper usages
We shouldn't set up the indirect PCM parameters at trigger but they should be set at prepare. Also, remove a useless debug message, too. Reviewed-by: Takashi Sakamoto <o-takashi@sakamocchi.jp> Signed-off-by: Takashi Iwai <tiwai@suse.de>
This commit is contained in:
parent
b81e7732ce
commit
d873d5ea89
|
@ -564,6 +564,8 @@ static int hal2_playback_prepare(struct snd_pcm_substream *substream)
|
|||
dac->sample_rate = hal2_compute_rate(dac, runtime->rate);
|
||||
memset(&dac->pcm_indirect, 0, sizeof(dac->pcm_indirect));
|
||||
dac->pcm_indirect.hw_buffer_size = H2_BUF_SIZE;
|
||||
dac->pcm_indirect.hw_queue_size = H2_BUF_SIZE / 2;
|
||||
dac->pcm_indirect.hw_io = dac->buffer_dma;
|
||||
dac->pcm_indirect.sw_buffer_size = snd_pcm_lib_buffer_bytes(substream);
|
||||
dac->substream = substream;
|
||||
hal2_setup_dac(hal2);
|
||||
|
@ -576,8 +578,6 @@ static int hal2_playback_trigger(struct snd_pcm_substream *substream, int cmd)
|
|||
|
||||
switch (cmd) {
|
||||
case SNDRV_PCM_TRIGGER_START:
|
||||
hal2->dac.pcm_indirect.hw_io = hal2->dac.buffer_dma;
|
||||
hal2->dac.pcm_indirect.hw_data = 0;
|
||||
hal2_start_dac(hal2);
|
||||
break;
|
||||
case SNDRV_PCM_TRIGGER_STOP:
|
||||
|
@ -615,7 +615,6 @@ static int hal2_playback_ack(struct snd_pcm_substream *substream)
|
|||
struct snd_hal2 *hal2 = snd_pcm_substream_chip(substream);
|
||||
struct hal2_codec *dac = &hal2->dac;
|
||||
|
||||
dac->pcm_indirect.hw_queue_size = H2_BUF_SIZE / 2;
|
||||
return snd_pcm_indirect_playback_transfer(substream,
|
||||
&dac->pcm_indirect,
|
||||
hal2_playback_transfer);
|
||||
|
@ -655,6 +654,7 @@ static int hal2_capture_prepare(struct snd_pcm_substream *substream)
|
|||
memset(&adc->pcm_indirect, 0, sizeof(adc->pcm_indirect));
|
||||
adc->pcm_indirect.hw_buffer_size = H2_BUF_SIZE;
|
||||
adc->pcm_indirect.hw_queue_size = H2_BUF_SIZE / 2;
|
||||
adc->pcm_indirect.hw_io = adc->buffer_dma;
|
||||
adc->pcm_indirect.sw_buffer_size = snd_pcm_lib_buffer_bytes(substream);
|
||||
adc->substream = substream;
|
||||
hal2_setup_adc(hal2);
|
||||
|
@ -667,9 +667,6 @@ static int hal2_capture_trigger(struct snd_pcm_substream *substream, int cmd)
|
|||
|
||||
switch (cmd) {
|
||||
case SNDRV_PCM_TRIGGER_START:
|
||||
hal2->adc.pcm_indirect.hw_io = hal2->adc.buffer_dma;
|
||||
hal2->adc.pcm_indirect.hw_data = 0;
|
||||
printk(KERN_DEBUG "buffer_dma %x\n", hal2->adc.buffer_dma);
|
||||
hal2_start_adc(hal2);
|
||||
break;
|
||||
case SNDRV_PCM_TRIGGER_STOP:
|
||||
|
|
Loading…
Reference in New Issue
Block a user