aboutsummaryrefslogtreecommitdiffstats
path: root/sound/soc/codecs/twl6040.c
diff options
context:
space:
mode:
authorPeter Ujfalusi <peter.ujfalusi@ti.com>2013-06-24 09:42:05 -0400
committerMark Brown <broonie@linaro.org>2013-06-24 11:06:02 -0400
commit68897497aa2e1eb9c3a6b55f8212cd1edc22acd5 (patch)
treea1f95bedfac89a30a00a55c8813e0e91f828108b /sound/soc/codecs/twl6040.c
parentfa223ec37c9f6710022381a25c352955675817f9 (diff)
ASoC: twl6040: Assign id for each DAI
Later we can identify the DAIs by this ID number. Signed-off-by: Peter Ujfalusi <peter.ujfalusi@ti.com> Signed-off-by: Mark Brown <broonie@linaro.org>
Diffstat (limited to 'sound/soc/codecs/twl6040.c')
-rw-r--r--sound/soc/codecs/twl6040.c13
1 files changed, 13 insertions, 0 deletions
diff --git a/sound/soc/codecs/twl6040.c b/sound/soc/codecs/twl6040.c
index c2f2fdbfef96..9ea3dbccc0b3 100644
--- a/sound/soc/codecs/twl6040.c
+++ b/sound/soc/codecs/twl6040.c
@@ -38,6 +38,14 @@
38 38
39#include "twl6040.h" 39#include "twl6040.h"
40 40
41enum twl6040_dai_id {
42 TWL6040_DAI_LEGACY = 0,
43 TWL6040_DAI_UL,
44 TWL6040_DAI_DL1,
45 TWL6040_DAI_DL2,
46 TWL6040_DAI_VIB,
47};
48
41#define TWL6040_RATES SNDRV_PCM_RATE_8000_96000 49#define TWL6040_RATES SNDRV_PCM_RATE_8000_96000
42#define TWL6040_FORMATS (SNDRV_PCM_FMTBIT_S32_LE) 50#define TWL6040_FORMATS (SNDRV_PCM_FMTBIT_S32_LE)
43 51
@@ -1036,6 +1044,7 @@ static const struct snd_soc_dai_ops twl6040_dai_ops = {
1036static struct snd_soc_dai_driver twl6040_dai[] = { 1044static struct snd_soc_dai_driver twl6040_dai[] = {
1037{ 1045{
1038 .name = "twl6040-legacy", 1046 .name = "twl6040-legacy",
1047 .id = TWL6040_DAI_LEGACY,
1039 .playback = { 1048 .playback = {
1040 .stream_name = "Legacy Playback", 1049 .stream_name = "Legacy Playback",
1041 .channels_min = 1, 1050 .channels_min = 1,
@@ -1054,6 +1063,7 @@ static struct snd_soc_dai_driver twl6040_dai[] = {
1054}, 1063},
1055{ 1064{
1056 .name = "twl6040-ul", 1065 .name = "twl6040-ul",
1066 .id = TWL6040_DAI_UL,
1057 .capture = { 1067 .capture = {
1058 .stream_name = "Capture", 1068 .stream_name = "Capture",
1059 .channels_min = 1, 1069 .channels_min = 1,
@@ -1065,6 +1075,7 @@ static struct snd_soc_dai_driver twl6040_dai[] = {
1065}, 1075},
1066{ 1076{
1067 .name = "twl6040-dl1", 1077 .name = "twl6040-dl1",
1078 .id = TWL6040_DAI_DL1,
1068 .playback = { 1079 .playback = {
1069 .stream_name = "Headset Playback", 1080 .stream_name = "Headset Playback",
1070 .channels_min = 1, 1081 .channels_min = 1,
@@ -1076,6 +1087,7 @@ static struct snd_soc_dai_driver twl6040_dai[] = {
1076}, 1087},
1077{ 1088{
1078 .name = "twl6040-dl2", 1089 .name = "twl6040-dl2",
1090 .id = TWL6040_DAI_DL2,
1079 .playback = { 1091 .playback = {
1080 .stream_name = "Handsfree Playback", 1092 .stream_name = "Handsfree Playback",
1081 .channels_min = 1, 1093 .channels_min = 1,
@@ -1087,6 +1099,7 @@ static struct snd_soc_dai_driver twl6040_dai[] = {
1087}, 1099},
1088{ 1100{
1089 .name = "twl6040-vib", 1101 .name = "twl6040-vib",
1102 .id = TWL6040_DAI_VIB,
1090 .playback = { 1103 .playback = {
1091 .stream_name = "Vibra Playback", 1104 .stream_name = "Vibra Playback",
1092 .channels_min = 1, 1105 .channels_min = 1,