[alsa-devel] [PATCH 2/2] ALSA sound driver for the AT73C213 DAC using Atmel SSC driver

Hans-Christian Egtvedt hcegtvedt at atmel.com
Tue Jul 17 10:54:19 CEST 2007


On Tue, 2007-07-17 at 10:48 +0200, Haavard Skinnemoen wrote:
> On Tue, 17 Jul 2007 10:37:21 +0200
> Hans-Christian Egtvedt <hcegtvedt at atmel.com> wrote:
> 
> > > > +	snd_pcm_set_ops(pcm, SNDRV_PCM_STREAM_PLAYBACK, &at73c213_playback_ops);
> > > > +
> > > > +	retval = snd_pcm_lib_preallocate_pages_for_all(chip->pcm,
> > > > +			SNDRV_DMA_TYPE_DEV,
> > > > +			snd_dma_continuous_data(GFP_KERNEL),
> > > > +			64 * 1024, 64 * 1024);  
> > > 
> > > For SNDRV_DMA_TYPE_DEV, pass the struct device pointer of the device
> > > to the third argument.  Then the pre-allocator will allocate the
> > > memory via dma_alloc_coherent() with the givn device.  If it's not
> > > appropriate, SNDRV_DMA_TYPE_CONTINUOUS type.  Anyway,
> > > snd_dma_continuous_data() is only for SNDRV_DMA_TYPE_CONTINUOUS.  
> > 
> > Ok, applied. Using &chip->spi->dev.
> 
> Not that I think it matters at the moment, but that's not entirely
> correct. The memory is used for DMA transfers to the SSC controller,
> not the SPI device, so you should pass the SSC's struct device here.
> 
> In other words, I think you should use &chip->ssc->pdev->dev.

Hmm, my fault, applied.

New patch attached.

-- 
With kind regards,

Hans-Christian Egtvedt, siv.ing. (M.Sc.)
Applications Engineer - AVR32 System Solutions - Atmel Norway
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-ALSA-sound-driver-for-the-AT73C213-DAC-using-Atmel-S.patch
Type: application/mbox
Size: 0 bytes
Desc: not available
Url : http://mailman.alsa-project.org/pipermail/alsa-devel/attachments/20070717/4233ad53/attachment-0001.bin 


More information about the Alsa-devel mailing list