aboutsummaryrefslogtreecommitdiffstats
path: root/sound/soc/codecs/bt-sco.c
diff options
context:
space:
mode:
Diffstat (limited to 'sound/soc/codecs/bt-sco.c')
-rw-r--r--sound/soc/codecs/bt-sco.c22
1 files changed, 21 insertions, 1 deletions
diff --git a/sound/soc/codecs/bt-sco.c b/sound/soc/codecs/bt-sco.c
index a081d9fcb166..c4cf0699e77f 100644
--- a/sound/soc/codecs/bt-sco.c
+++ b/sound/soc/codecs/bt-sco.c
@@ -15,15 +15,27 @@
15 15
16#include <sound/soc.h> 16#include <sound/soc.h>
17 17
18static const struct snd_soc_dapm_widget bt_sco_widgets[] = {
19 SND_SOC_DAPM_INPUT("RX"),
20 SND_SOC_DAPM_OUTPUT("TX"),
21};
22
23static const struct snd_soc_dapm_route bt_sco_routes[] = {
24 { "Capture", NULL, "RX" },
25 { "TX", NULL, "Playback" },
26};
27
18static struct snd_soc_dai_driver bt_sco_dai = { 28static struct snd_soc_dai_driver bt_sco_dai = {
19 .name = "bt-sco-pcm", 29 .name = "bt-sco-pcm",
20 .playback = { 30 .playback = {
31 .stream_name = "Playback",
21 .channels_min = 1, 32 .channels_min = 1,
22 .channels_max = 1, 33 .channels_max = 1,
23 .rates = SNDRV_PCM_RATE_8000, 34 .rates = SNDRV_PCM_RATE_8000,
24 .formats = SNDRV_PCM_FMTBIT_S16_LE, 35 .formats = SNDRV_PCM_FMTBIT_S16_LE,
25 }, 36 },
26 .capture = { 37 .capture = {
38 .stream_name = "Capture",
27 .channels_min = 1, 39 .channels_min = 1,
28 .channels_max = 1, 40 .channels_max = 1,
29 .rates = SNDRV_PCM_RATE_8000, 41 .rates = SNDRV_PCM_RATE_8000,
@@ -31,7 +43,12 @@ static struct snd_soc_dai_driver bt_sco_dai = {
31 }, 43 },
32}; 44};
33 45
34static struct snd_soc_codec_driver soc_codec_dev_bt_sco; 46static struct snd_soc_codec_driver soc_codec_dev_bt_sco = {
47 .dapm_widgets = bt_sco_widgets,
48 .num_dapm_widgets = ARRAY_SIZE(bt_sco_widgets),
49 .dapm_routes = bt_sco_routes,
50 .num_dapm_routes = ARRAY_SIZE(bt_sco_routes),
51};
35 52
36static int bt_sco_probe(struct platform_device *pdev) 53static int bt_sco_probe(struct platform_device *pdev)
37{ 54{
@@ -50,6 +67,9 @@ static struct platform_device_id bt_sco_driver_ids[] = {
50 { 67 {
51 .name = "dfbmcs320", 68 .name = "dfbmcs320",
52 }, 69 },
70 {
71 .name = "bt-sco",
72 },
53 {}, 73 {},
54}; 74};
55MODULE_DEVICE_TABLE(platform, bt_sco_driver_ids); 75MODULE_DEVICE_TABLE(platform, bt_sco_driver_ids);