Re: [PATCH 2/3] Add ALSA driver for Atmel Audio Bitstream DAC

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Wed, 04 Feb 2009 13:52:06 +0100
Takashi Iwai <tiwai@xxxxxxx> wrote:

> At Wed, 4 Feb 2009 13:18:35 +0100,
> Hans-Christian Egtvedt wrote:
> > 
> > > > +static int at32_abdac_trigger(struct snd_pcm_substream
> > > > *substream, int cmd) +{
> > > > +	struct at32_abdac *dac =
> > > > snd_pcm_substream_chip(substream);
> > > > +	int retval = -EINVAL;
> > > > +
> > > > +	switch (cmd) {
> > > > +	case SNDRV_PCM_TRIGGER_PAUSE_RELEASE: /* fall through
> > > > */
> > > > +	case SNDRV_PCM_TRIGGER_RESUME: /* fall through */
> > > > +	case SNDRV_PCM_TRIGGER_START:
> > > > +		clk_enable(dac->sample_clk);
> > > > +		retval = dw_dma_cyclic_start(dac->dma.chan);
> > > > +		if (retval)
> > > > +			goto out;
> > > > +		dac_writel(dac, CTRL, DAC_BIT(EN));
> > > > +		break;
> > > > +	case SNDRV_PCM_TRIGGER_PAUSE_PUSH: /* fall through */
> > > > +	case SNDRV_PCM_TRIGGER_SUSPEND: /* fall through */
> > > > +	case SNDRV_PCM_TRIGGER_STOP:
> > > > +		set_bit(DMA_STOP, &dac->flags);
> > > > +		dw_dma_cyclic_stop(dac->dma.chan);
> > > > +		dac_writel(dac, DATA, 0);
> > > > +		dac_writel(dac, CTRL, 0);
> > > > +		clk_disable(dac->sample_clk);
> > > > +		break;
> > > 
> > > No retval is set for these cases?
> > > 
> > 
> > Nope, they are all void return functions and will always complete
> > successfully.
> 
> I meant that retval is kept -EINVAL in the cases for STOP, etc,
> although the call is successful.
> 

Ops, my bad, will fix.

Thanks.

-- 
Best regards,
Hans-Christian Egtvedt
_______________________________________________
Alsa-devel mailing list
Alsa-devel@xxxxxxxxxxxxxxxx
http://mailman.alsa-project.org/mailman/listinfo/alsa-devel

[Index of Archives]     [ALSA User]     [Linux Audio Users]     [Kernel Archive]     [Asterisk PBX]     [Photo Sharing]     [Linux Sound]     [Video 4 Linux]     [Gimp]     [Yosemite News]

  Powered by Linux