Repository navigation
Commit 1e112c3
ASoC: ti: davinci-mcasp: Correct slot_width posed constraint
The slot_width is a property for the bus while the constraint for
SNDRV_PCM_HW_PARAM_SAMPLE_BITS is for the in memory format.
Applying slot_width constraint to sample_bits works most of the time, but
it will blacklist valid formats in some cases.
With slot_width 24 we can support S24_3LE and S24_LE formats as they both
look the same on the bus, but a a 24 constraint on sample_bits would not
allow S24_LE as it is stored in 32bits in memory.
Implement a simple hw_rule function to allow all formats which require less
or equal number of bits on the bus as slot_width (if configured).
Signed-off-by: Peter Ujfalusi <peter.ujfalusi@ti.com>
Link: https://lore.kernel.org/r/20190726064244.3762-2-peter.ujfalusi@ti.com
Signed-off-by: Mark Brown <broonie@kernel.org>1 parent 789e162 commit 1e112c3
1 file changed
Lines changed: 34 additions & 9 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1257 | 1257 | | |
1258 | 1258 | | |
1259 | 1259 | | |
| 1260 | + | |
| 1261 | + | |
| 1262 | + | |
| 1263 | + | |
| 1264 | + | |
| 1265 | + | |
| 1266 | + | |
| 1267 | + | |
| 1268 | + | |
| 1269 | + | |
| 1270 | + | |
| 1271 | + | |
| 1272 | + | |
| 1273 | + | |
| 1274 | + | |
| 1275 | + | |
| 1276 | + | |
| 1277 | + | |
| 1278 | + | |
| 1279 | + | |
| 1280 | + | |
| 1281 | + | |
1260 | 1282 | | |
1261 | 1283 | | |
1262 | 1284 | | |
| |||
1378 | 1400 | | |
1379 | 1401 | | |
1380 | 1402 | | |
1381 | | - | |
| 1403 | + | |
1382 | 1404 | | |
1383 | 1405 | | |
1384 | 1406 | | |
| |||
1407 | 1429 | | |
1408 | 1430 | | |
1409 | 1431 | | |
| 1432 | + | |
1410 | 1433 | | |
1411 | 1434 | | |
1412 | 1435 | | |
| |||
1432 | 1455 | | |
1433 | 1456 | | |
1434 | 1457 | | |
1435 | | - | |
1436 | | - | |
1437 | | - | |
1438 | | - | |
| 1458 | + | |
| 1459 | + | |
| 1460 | + | |
| 1461 | + | |
| 1462 | + | |
| 1463 | + | |
| 1464 | + | |
| 1465 | + | |
| 1466 | + | |
| 1467 | + | |
1439 | 1468 | | |
1440 | 1469 | | |
1441 | 1470 | | |
1442 | 1471 | | |
1443 | 1472 | | |
1444 | 1473 | | |
1445 | | - | |
1446 | | - | |
1447 | | - | |
1448 | | - | |
1449 | 1474 | | |
1450 | 1475 | | |
1451 | 1476 | | |
| |||
0 commit comments