Re: [PATCH RFC v1] ASoC: core: Support for limiting the volume

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

 



On Friday 07 May 2010 12:56:15 ext Mark Brown wrote:
> On Fri, May 07, 2010 at 10:26:35AM +0300, Peter Ujfalusi wrote:
> > Probably it would be better to return with 0 only, if we _changed_ the
> > maximum. I'll resend after the comments.
> 
> No, I think it's fine to report success so long as the requested change
> can be implemented - if it's a noop it might be worth printing a warning
> but the requested setting is in effect.

I think:
if (max <= mc->max) {
	mc->max = max;
	ret = 0;
}

Would be appropriate. We still report error, if the user asked out of limit 
gain, but we report success, if the limit has not been actually changed.

-- 
Péter
_______________________________________________
Alsa-devel mailing list
Alsa-devel@xxxxxxxxxxxxxxxx
http://mailman.alsa-project.org/mailman/listinfo/alsa-devel


[Index of Archives]     [ALSA User]     [Linux Audio Users]     [Kernel Archive]     [Asterisk PBX]     [Photo Sharing]     [Linux Sound]     [Video 4 Linux]     [Gimp]     [Yosemite News]

  Powered by Linux