Re: [PATCH v2] ASoC: max9867: shutdown codec when changing filter type

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

 



On Wed, Aug 26, 2020 at 05:07:24PM +0200, Pavel Dobias wrote:

> +	/* don't allow change if component active */
> +	if (snd_soc_component_active(component)) {
> +		return -EBUSY;
> +	}

AFAICT the filter only applies to the DAC/ADC but this is checking if
the component is in use at all and there's bypass paths - we should only
restrict this when the DAC and ADC are in use.

> +
> +	if (mode > 1)
> +		return -EINVAL;
> +	mode = mode ? MAX9867_CODECFLTR_MODE : 0;

Please write normal conditional statements to improve readability.

Attachment: signature.asc
Description: PGP signature


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

  Powered by Linux