[alsa-devel] [PATCH] ASoC drivers for the Freescale MPC8610 SoC
Lee Revell
rlrevell at joe-job.com
Fri Dec 21 06:28:40 CET 2007
On Dec 20, 2007 8:54 AM, Takashi Iwai <tiwai at suse.de> wrote:
> At Thu, 20 Dec 2007 08:24:35 -0600,
> Timur Tabi wrote:
> >
> > >> +static int fsl_dma_new(struct snd_card *card, struct snd_soc_codec_dai *dai,
> > >> + struct snd_pcm *pcm)
> > >> +{
> > >> + static u64 fsl_dma_dmamask = 0xffffffff;
> > >> + int ret;
> > >> +
> > >> + if (!card->dev->dma_mask)
> > >> + card->dev->dma_mask = &fsl_dma_dmamask;
> > >
> > > I haven't read how your channel allocation works, but providing a
> > > pointer to a local static variable is a bit fishy no matter what.
> >
> > I just copied this code from another module. All the ALSA drivers do this,
>
> All? No, only a few...
> For PCI, usually pci_set_dma_mask() and pci_set_consistent_dma_mask()
> are used, of course.
Timur,
Nicely commented driver! I wish they were all like this ;-)
Please use DMA_32BIT_MASK (see include/linux/dma-mapping.h) instead of
0xffffffff. I've personally fixed a heisenbug in an ALSA driver
caused by incorrectly typed DMA mask...
Lee
More information about the Alsa-devel
mailing list