Commit 6510bdc3f4d7ea783d47af5a58741ea0b77c6823
Committed by
Peter Ujfalusi
1 parent
87b25c1bab
ASoC: twl6040: add all ABE DAIs
Add all DAIs to fully support OMAP4 ABE. Signed-off-by: Liam Girdwood <lrg@ti.com> Signed-off-by: Peter Ujfalusi <peter.ujfalusi@ti.com> Acked-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Showing 1 changed file with 36 additions and 8 deletions Side-by-side Diff
sound/soc/codecs/twl6040.c
... | ... | @@ -1359,23 +1359,51 @@ |
1359 | 1359 | .set_sysclk = twl6040_set_dai_sysclk, |
1360 | 1360 | }; |
1361 | 1361 | |
1362 | -static struct snd_soc_dai_driver twl6040_dai = { | |
1363 | - .name = "twl6040-hifi", | |
1362 | +static struct snd_soc_dai_driver twl6040_dai[] = { | |
1363 | +{ | |
1364 | + .name = "twl6040-ul", | |
1365 | + .capture = { | |
1366 | + .stream_name = "Capture", | |
1367 | + .channels_min = 1, | |
1368 | + .channels_max = 2, | |
1369 | + .rates = TWL6040_RATES, | |
1370 | + .formats = TWL6040_FORMATS, | |
1371 | + }, | |
1372 | + .ops = &twl6040_dai_ops, | |
1373 | +}, | |
1374 | +{ | |
1375 | + .name = "twl6040-dl1", | |
1364 | 1376 | .playback = { |
1365 | - .stream_name = "Playback", | |
1377 | + .stream_name = "Headset Playback", | |
1366 | 1378 | .channels_min = 1, |
1367 | - .channels_max = 4, | |
1379 | + .channels_max = 2, | |
1368 | 1380 | .rates = TWL6040_RATES, |
1369 | 1381 | .formats = TWL6040_FORMATS, |
1370 | 1382 | }, |
1371 | - .capture = { | |
1372 | - .stream_name = "Capture", | |
1383 | + .ops = &twl6040_dai_ops, | |
1384 | +}, | |
1385 | +{ | |
1386 | + .name = "twl6040-dl2", | |
1387 | + .playback = { | |
1388 | + .stream_name = "Handsfree Playback", | |
1373 | 1389 | .channels_min = 1, |
1374 | 1390 | .channels_max = 2, |
1375 | 1391 | .rates = TWL6040_RATES, |
1376 | 1392 | .formats = TWL6040_FORMATS, |
1377 | 1393 | }, |
1378 | 1394 | .ops = &twl6040_dai_ops, |
1395 | +}, | |
1396 | +{ | |
1397 | + .name = "twl6040-vib", | |
1398 | + .playback = { | |
1399 | + .stream_name = "Vibra Playback", | |
1400 | + .channels_min = 2, | |
1401 | + .channels_max = 2, | |
1402 | + .rates = SNDRV_PCM_RATE_CONTINUOUS, | |
1403 | + .formats = TWL6040_FORMATS, | |
1404 | + }, | |
1405 | + .ops = &twl6040_dai_ops, | |
1406 | +}, | |
1379 | 1407 | }; |
1380 | 1408 | |
1381 | 1409 | #ifdef CONFIG_PM |
... | ... | @@ -1502,8 +1530,8 @@ |
1502 | 1530 | |
1503 | 1531 | static int __devinit twl6040_codec_probe(struct platform_device *pdev) |
1504 | 1532 | { |
1505 | - return snd_soc_register_codec(&pdev->dev, | |
1506 | - &soc_codec_dev_twl6040, &twl6040_dai, 1); | |
1533 | + return snd_soc_register_codec(&pdev->dev, &soc_codec_dev_twl6040, | |
1534 | + twl6040_dai, ARRAY_SIZE(twl6040_dai)); | |
1507 | 1535 | } |
1508 | 1536 | |
1509 | 1537 | static int __devexit twl6040_codec_remove(struct platform_device *pdev) |