On 06/30/2014 08:09 AM, Bard Liao wrote:
-----Original Message----- From: Lars-Peter Clausen [mailto:lars@metafoo.de] Sent: Friday, June 27, 2014 10:05 PM To: Bard Liao; broonie@kernel.org; lgirdwood@gmail.com Cc: Oder Chiou; alsa-devel@alsa-project.org; Flove Subject: Re: [alsa-devel] [PATCH] ASoC: rt5640: add ASRC support
I wonder if that shouldn't be something that is automatically enabled/disabled based on the samplerates involved. Also for enable/disable controls use a switch control rather than a enum.
To turn on/off rt5640's ASRC function is not decided by only one condition. To make it flexible, I prefer to use a control to enable/ disable ASRC function.
But the driver should be able to autodetect those conditions, shouldn't it?
Do you mean SOC_SINGLE_EXT? I didn't find a _SWITCH control in soc.h
Yes SOC_SINGLE_EXT() will create a boolean switch if xmax == 1 (otherwise it will create a integer control).
- Lars