diff options
Diffstat (limited to 'sound/soc/codecs/twl6040.c')
-rw-r--r-- | sound/soc/codecs/twl6040.c | 44 |
1 files changed, 36 insertions, 8 deletions
diff --git a/sound/soc/codecs/twl6040.c b/sound/soc/codecs/twl6040.c index a20e293b27b4..28dc5d9e5839 100644 --- a/sound/soc/codecs/twl6040.c +++ b/sound/soc/codecs/twl6040.c | |||
@@ -1359,23 +1359,51 @@ static struct snd_soc_dai_ops twl6040_dai_ops = { | |||
1359 | .set_sysclk = twl6040_set_dai_sysclk, | 1359 | .set_sysclk = twl6040_set_dai_sysclk, |
1360 | }; | 1360 | }; |
1361 | 1361 | ||
1362 | static struct snd_soc_dai_driver twl6040_dai = { | 1362 | static struct snd_soc_dai_driver twl6040_dai[] = { |
1363 | .name = "twl6040-hifi", | 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 | .playback = { | 1376 | .playback = { |
1365 | .stream_name = "Playback", | 1377 | .stream_name = "Headset Playback", |
1366 | .channels_min = 1, | 1378 | .channels_min = 1, |
1367 | .channels_max = 4, | 1379 | .channels_max = 2, |
1368 | .rates = TWL6040_RATES, | 1380 | .rates = TWL6040_RATES, |
1369 | .formats = TWL6040_FORMATS, | 1381 | .formats = TWL6040_FORMATS, |
1370 | }, | 1382 | }, |
1371 | .capture = { | 1383 | .ops = &twl6040_dai_ops, |
1372 | .stream_name = "Capture", | 1384 | }, |
1385 | { | ||
1386 | .name = "twl6040-dl2", | ||
1387 | .playback = { | ||
1388 | .stream_name = "Handsfree Playback", | ||
1373 | .channels_min = 1, | 1389 | .channels_min = 1, |
1374 | .channels_max = 2, | 1390 | .channels_max = 2, |
1375 | .rates = TWL6040_RATES, | 1391 | .rates = TWL6040_RATES, |
1376 | .formats = TWL6040_FORMATS, | 1392 | .formats = TWL6040_FORMATS, |
1377 | }, | 1393 | }, |
1378 | .ops = &twl6040_dai_ops, | 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 | #ifdef CONFIG_PM | 1409 | #ifdef CONFIG_PM |
@@ -1502,8 +1530,8 @@ static struct snd_soc_codec_driver soc_codec_dev_twl6040 = { | |||
1502 | 1530 | ||
1503 | static int __devinit twl6040_codec_probe(struct platform_device *pdev) | 1531 | static int __devinit twl6040_codec_probe(struct platform_device *pdev) |
1504 | { | 1532 | { |
1505 | return snd_soc_register_codec(&pdev->dev, | 1533 | return snd_soc_register_codec(&pdev->dev, &soc_codec_dev_twl6040, |
1506 | &soc_codec_dev_twl6040, &twl6040_dai, 1); | 1534 | twl6040_dai, ARRAY_SIZE(twl6040_dai)); |
1507 | } | 1535 | } |
1508 | 1536 | ||
1509 | static int __devexit twl6040_codec_remove(struct platform_device *pdev) | 1537 | static int __devexit twl6040_codec_remove(struct platform_device *pdev) |