Re: [alsa-devel] [PATCH v2 3/5] ASoC: generic-dmaengine-pcm: Prepare formats mask for valid physical sample sizes

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

 



At Wed, 02 Jul 2014 16:10:09 +0200,
Lars-Peter Clausen wrote:
> 
> On 07/02/2014 03:47 PM, Takashi Iwai wrote:
> [...]
> >> +	/*
> >> +	 * Prepare formats mask for valid/allowed sample types. If the dma does
> >> +	 * not have support for the given physical word size, it needs to be
> >> +	 * masked out so user space can not use the format which produces
> >> +	 * corrupted audio.
> >> +	 * In case the dma driver does not implement the slave_caps the default
> >> +	 * assumption is that it supports 1, 2 and 4 bytes widths.
> >> +	 */
> >> +	for (i = 0; i <= SNDRV_PCM_FORMAT_LAST; i++) {
> >> +		int bits = snd_pcm_format_physical_width(i);
> >
> > Better to add a negative value check.  Some formats return -EINVAL.
> >
> 
> So what should we do with those formats? Not support them?

Yes, these are special formats that can't be handled generically.


Takashi
--
To unsubscribe from this list: send the line "unsubscribe dmaengine" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [Linux Kernel]     [Linux ARM (vger)]     [Linux ARM MSM]     [Linux Omap]     [Linux Arm]     [Linux Tegra]     [Fedora ARM]     [Linux for Samsung SOC]     [eCos]     [Linux PCI]     [Linux Fastboot]     [Gcc Help]     [Git]     [DCCP]     [IETF Announce]     [Security]     [Linux MIPS]     [Yosemite Campsites]

  Powered by Linux