[alsa-devel] [RFC PATCH] ALSA: split params refinement to seperated file

Jie, Yang yang.jie at intel.com
Fri Jun 12 11:05:58 CEST 2015


> -----Original Message-----
> From: Takashi Iwai [mailto:tiwai at suse.de]
> Sent: Wednesday, June 10, 2015 2:51 AM
> To: Mark Brown
> Cc: Jie, Yang; alsa-devel at alsa-project.org; Girdwood, Liam R; Zhang, Vivian
> Subject: Re: [RFC PATCH] ALSA: split params refinement to seperated file
> 
> At Tue, 9 Jun 2015 18:57:11 +0100,
> Mark Brown wrote:
> >
> > On Mon, Jun 08, 2015 at 11:21:17AM +0200, Takashi Iwai wrote:
> >
> > > Just begin with adding ifdefs instead of reshuffling the code.  This
> > > will make easier to understand what you're going to change.  At
> > > least, it's good enough for RFC.  After that, we can refactor the code.
> >
> > Plus if the patches get applied it at least makes it easier for people
> > who do decide to do such major surgery.
> >
> > > Removing the hw constraints refinement is rather a radical change.
> > > It's a part of the PCM core functionality, and removing it means
> > > that the driver has no ways to refuse the incompatible parameters
> > > even if it knows it's broken.  So, IMO, this is the very last
> > > resort.  We can start from ripping off lower hanging fruits.
> >
> > Indeed, part of the reason I was asking about the split was to help me
> > figure out what takes the place of constraints - sounds like nothing?
> > I wonder if we could have cards support this by providing fixed
> > configurations that we could check against using less code or something.
> 
> I think it's possible to reduce the hw refine part.  But, the question is
> whether a kernel driver should trust user-space blindly.  The removal of
> *full* hw constraints means that, and I'm worried by lack of safety.
> 
> > But like you say, we *must* have some other room for improvement.
> 
> Yes, let's see other things we can cut off.  For example, the PCM timer is easy
> to trim.  It's used by dmix, but most apps / backends don't need it at all.  Then
> the whole ALSA timer component can be removed, too.

Thanks for pointing out that, we will investigate cutting off the PCM timer part.

~Keyon
> 
> 
> Takashi


More information about the Alsa-devel mailing list