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

Subhransu S. Prusty subhransu.s.prusty at intel.com
Sat Dec 5 12:27:03 CET 2015


On Fri, Dec 04, 2015 at 06:59:19AM +0100, Takashi Iwai wrote:
> On Fri, 04 Dec 2015 12:08:26 +0100,
> Subhransu S. Prusty wrote:
> > 
> > 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?
> 
> No you seem misunderstanding the concept...

Sorry about that. 

I re-read the spec, it doesn't mention the container size for the samples.
Assuming the container will be 32 bits, then I think we should use S24_LE
for both 20 and 24 bits.

Can you please help to understand which concept I got wrong here.

Regards,
Subhransu
> 
> 
> Takashi

-- 


More information about the Alsa-devel mailing list