[PATCH v2 05/14] ALSA: pcm: Add DRM helper to set constraint for format

Subhransu S. Prusty subhransu.s.prusty at intel.com
Fri Dec 4 03:08:26 PST 2015


On Thu, Dec 03, 2015 at 04:57:14PM +0100, Takashi Iwai wrote:
> On Thu, 03 Dec 2015 22:08:53 +0100,
> Subhransu S. Prusty wrote:
> > 
> > Setting the constraint format based on ELD was missing bit in
> > the sound/core pcm drm. Added with this patch.
> 
> No, you can't define these here.  The format really depends on the
> hardware, while the rate and the channels are independent.

Probably then I will move this definition to driver.

> How do you know it's little-endian?  And why it must be S24_LE for
> 24bit, not S32_LE?

Regarding the little-endian, In the driver I think I should set the
constraint for both LE and BE. And the platform as it only supports LE alone
it will set the constraint accordingly and edianness will be taken care of.

Regarding the sample size, from short audio descriptor, the samples can be
one of 16/20/24 bit. I could use the format bits for 16 and 24 bits but
don't know which format bits macro is suitable for 20bits. So kept it as
S32_LE for 20bits. Should I fix the format bits for 20bits to use S24?

Regards,
Subhransu

> 
> 
> Takashi

-- 


More information about the dri-devel mailing list