From mboxrd@z Thu Jan 1 00:00:00 1970 From: Takashi Iwai Subject: Re: [PATCH 2/2] ALSA sound driver for the AT73C213 DAC using Atmel SSC driver Date: Tue, 17 Jul 2007 12:23:56 +0200 Message-ID: References: <11845952993023-git-send-email-hcegtvedt@atmel.com> <11845952991232-git-send-email-hcegtvedt@atmel.com> <1184661441.12675.6.camel@localhost.localdomain> <20070717104859.34f76382@dhcp-255-175.norway.atmel.com> <1184662459.12675.8.camel@localhost.localdomain> Mime-Version: 1.0 (generated by SEMI 1.14.6 - "Maruoka") Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: Received: from mx2.suse.de (cantor2.suse.de [195.135.220.15]) by alsa0.perex.cz (Postfix) with ESMTP id 968BC1038D9 for ; Tue, 17 Jul 2007 12:23:58 +0200 (CEST) In-Reply-To: <1184662459.12675.8.camel@localhost.localdomain> List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: alsa-devel-bounces@alsa-project.org Errors-To: alsa-devel-bounces@alsa-project.org To: Hans-Christian Egtvedt Cc: alsa-devel@alsa-project.org, kernel@avr32linux.org, Haavard Skinnemoen List-Id: alsa-devel@alsa-project.org At Tue, 17 Jul 2007 10:54:19 +0200, Hans-Christian Egtvedt wrote: > > > On Tue, 2007-07-17 at 10:48 +0200, Haavard Skinnemoen wrote: > > On Tue, 17 Jul 2007 10:37:21 +0200 > > Hans-Christian Egtvedt 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. The patch looks fine, but I suppose it's a post-2.6.23 material, judging from the current situation. Is it OK? Then I'll queue it soon after the merge window is closed, so that your driver appears in the mm tree. thanks, Takashi