Re: [PATCH v0] ASoC: rsnd: core: Check convert rate in rsnd_hw_params

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

 



Hi Mikhail

Thank you for your patch

> +			switch (rsnd_mod_id(src_mod)) {
> +			/*
> +			 * SRC0 can downsample 4, 6 and 8 channel audio up to 4 times.
> +			 * SRC1, SRC3 and SRC4 can downsample 4 channel audio
> +			 * up to 4 times.
> +			 * SRC1, SRC3 and SRC4 can downsample 6 and 8 channel audio
> +			 * no more than twice.
> +			 */
> +			case 1:
> +			case 3:
> +			case 4:
> +				if (channel > 4) {
> +					k_down = 2;
> +					break;
> +				}
> +			case 0:
> +				if (channel > 2)
> +					k_down = 4;
> +				break;
> +
> +			/* Other SRC units do not support more than 2 channels */
> +			default:
> +				if (channel > 2)
> +					return -EINVAL;
> +			}

I think you want to add "fallthrough" between case 1/3/4 and case 0 ?

Thank you for your help !!

Best regards
---
Kuninori Morimoto



[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