aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLars-Peter Clausen <lars@metafoo.de>2014-02-04 14:55:31 -0500
committerMark Brown <broonie@linaro.org>2014-02-05 10:52:48 -0500
commit6e84b9768dfb299a9881895b331e3e532041fae4 (patch)
tree719fbfe8f4e538e27dfba870286f7c22eaf62cf3
parent38dbfb59d1175ef458d006556061adeaa8751b72 (diff)
ASoC: cs42l73: Don't mix SNDRV_PCM_RATE_KNOT with specific rates
SNDRV_PCM_RATE_KNOT means that the device can support rates that can not be expressed using the rate bits. The driver will provide a list of those rates specified through constraints. Any rate bits that are set in the rates mask will be ignored. So setting other rate bits besides SNDRV_PCM_RATE_KNOT wont have any effect, but might be confusing to the casual reader, so remove them. Signed-off-by: Lars-Peter Clausen <lars@metafoo.de> Acked-by: Brian Austin <brian.austin@cirrus.com> Signed-off-by: Mark Brown <broonie@linaro.org>
-rw-r--r--sound/soc/codecs/cs42l73.c15
1 files changed, 6 insertions, 9 deletions
diff --git a/sound/soc/codecs/cs42l73.c b/sound/soc/codecs/cs42l73.c
index 549d5d6a3fef..7cae046c7dd0 100644
--- a/sound/soc/codecs/cs42l73.c
+++ b/sound/soc/codecs/cs42l73.c
@@ -1255,9 +1255,6 @@ static int cs42l73_pcm_startup(struct snd_pcm_substream *substream,
1255 return 0; 1255 return 0;
1256} 1256}
1257 1257
1258/* SNDRV_PCM_RATE_KNOT -> 12000, 24000 Hz, limit with constraint list */
1259#define CS42L73_RATES (SNDRV_PCM_RATE_8000_48000 | SNDRV_PCM_RATE_KNOT)
1260
1261 1258
1262#define CS42L73_FORMATS (SNDRV_PCM_FMTBIT_S16_LE | SNDRV_PCM_FMTBIT_S20_3LE |\ 1259#define CS42L73_FORMATS (SNDRV_PCM_FMTBIT_S16_LE | SNDRV_PCM_FMTBIT_S20_3LE |\
1263 SNDRV_PCM_FMTBIT_S24_LE) 1260 SNDRV_PCM_FMTBIT_S24_LE)
@@ -1278,14 +1275,14 @@ static struct snd_soc_dai_driver cs42l73_dai[] = {
1278 .stream_name = "XSP Playback", 1275 .stream_name = "XSP Playback",
1279 .channels_min = 1, 1276 .channels_min = 1,
1280 .channels_max = 2, 1277 .channels_max = 2,
1281 .rates = CS42L73_RATES, 1278 .rates = SNDRV_PCM_RATE_KNOT,
1282 .formats = CS42L73_FORMATS, 1279 .formats = CS42L73_FORMATS,
1283 }, 1280 },
1284 .capture = { 1281 .capture = {
1285 .stream_name = "XSP Capture", 1282 .stream_name = "XSP Capture",
1286 .channels_min = 1, 1283 .channels_min = 1,
1287 .channels_max = 2, 1284 .channels_max = 2,
1288 .rates = CS42L73_RATES, 1285 .rates = SNDRV_PCM_RATE_KNOT,
1289 .formats = CS42L73_FORMATS, 1286 .formats = CS42L73_FORMATS,
1290 }, 1287 },
1291 .ops = &cs42l73_ops, 1288 .ops = &cs42l73_ops,
@@ -1298,14 +1295,14 @@ static struct snd_soc_dai_driver cs42l73_dai[] = {
1298 .stream_name = "ASP Playback", 1295 .stream_name = "ASP Playback",
1299 .channels_min = 2, 1296 .channels_min = 2,
1300 .channels_max = 2, 1297 .channels_max = 2,
1301 .rates = CS42L73_RATES, 1298 .rates = SNDRV_PCM_RATE_KNOT,
1302 .formats = CS42L73_FORMATS, 1299 .formats = CS42L73_FORMATS,
1303 }, 1300 },
1304 .capture = { 1301 .capture = {
1305 .stream_name = "ASP Capture", 1302 .stream_name = "ASP Capture",
1306 .channels_min = 2, 1303 .channels_min = 2,
1307 .channels_max = 2, 1304 .channels_max = 2,
1308 .rates = CS42L73_RATES, 1305 .rates = SNDRV_PCM_RATE_KNOT,
1309 .formats = CS42L73_FORMATS, 1306 .formats = CS42L73_FORMATS,
1310 }, 1307 },
1311 .ops = &cs42l73_ops, 1308 .ops = &cs42l73_ops,
@@ -1318,14 +1315,14 @@ static struct snd_soc_dai_driver cs42l73_dai[] = {
1318 .stream_name = "VSP Playback", 1315 .stream_name = "VSP Playback",
1319 .channels_min = 1, 1316 .channels_min = 1,
1320 .channels_max = 2, 1317 .channels_max = 2,
1321 .rates = CS42L73_RATES, 1318 .rates = SNDRV_PCM_RATE_KNOT,
1322 .formats = CS42L73_FORMATS, 1319 .formats = CS42L73_FORMATS,
1323 }, 1320 },
1324 .capture = { 1321 .capture = {
1325 .stream_name = "VSP Capture", 1322 .stream_name = "VSP Capture",
1326 .channels_min = 1, 1323 .channels_min = 1,
1327 .channels_max = 2, 1324 .channels_max = 2,
1328 .rates = CS42L73_RATES, 1325 .rates = SNDRV_PCM_RATE_KNOT,
1329 .formats = CS42L73_FORMATS, 1326 .formats = CS42L73_FORMATS,
1330 }, 1327 },
1331 .ops = &cs42l73_ops, 1328 .ops = &cs42l73_ops,