diff options
| author | Mark Brown <broonie@linaro.org> | 2013-08-22 09:28:50 -0400 |
|---|---|---|
| committer | Mark Brown <broonie@linaro.org> | 2013-08-22 09:28:50 -0400 |
| commit | 8ef2292edbe50c432c5aa816e8add7d2ce6e894c (patch) | |
| tree | 6673d34f718e79133c4a6367d261d7ae759a20d8 | |
| parent | 309018605762e816cd99e4b1f4f053df32f6bc8a (diff) | |
| parent | fc6061486534a8dfee02dd6b9dd523789abd9a3d (diff) | |
Merge remote-tracking branch 'asoc/topic/spdif' into asoc-next
| -rw-r--r-- | sound/soc/codecs/spdif_receiver.c | 17 | ||||
| -rw-r--r-- | sound/soc/codecs/spdif_transmitter.c | 18 |
2 files changed, 32 insertions, 3 deletions
diff --git a/sound/soc/codecs/spdif_receiver.c b/sound/soc/codecs/spdif_receiver.c index e9d7881ed2c8..e3501f40c7b3 100644 --- a/sound/soc/codecs/spdif_receiver.c +++ b/sound/soc/codecs/spdif_receiver.c | |||
| @@ -23,11 +23,26 @@ | |||
| 23 | #include <sound/initval.h> | 23 | #include <sound/initval.h> |
| 24 | #include <linux/of.h> | 24 | #include <linux/of.h> |
| 25 | 25 | ||
| 26 | static const struct snd_soc_dapm_widget dir_widgets[] = { | ||
| 27 | SND_SOC_DAPM_INPUT("spdif-in"), | ||
| 28 | }; | ||
| 29 | |||
| 30 | static const struct snd_soc_dapm_route dir_routes[] = { | ||
| 31 | { "Capture", NULL, "spdif-in" }, | ||
| 32 | }; | ||
| 33 | |||
| 26 | #define STUB_RATES SNDRV_PCM_RATE_8000_192000 | 34 | #define STUB_RATES SNDRV_PCM_RATE_8000_192000 |
| 27 | #define STUB_FORMATS (SNDRV_PCM_FMTBIT_S16_LE | \ | 35 | #define STUB_FORMATS (SNDRV_PCM_FMTBIT_S16_LE | \ |
| 36 | SNDRV_PCM_FMTBIT_S20_3LE | \ | ||
| 37 | SNDRV_PCM_FMTBIT_S24_LE | \ | ||
| 28 | SNDRV_PCM_FMTBIT_IEC958_SUBFRAME_LE) | 38 | SNDRV_PCM_FMTBIT_IEC958_SUBFRAME_LE) |
| 29 | 39 | ||
| 30 | static struct snd_soc_codec_driver soc_codec_spdif_dir; | 40 | static struct snd_soc_codec_driver soc_codec_spdif_dir = { |
| 41 | .dapm_widgets = dir_widgets, | ||
| 42 | .num_dapm_widgets = ARRAY_SIZE(dir_widgets), | ||
| 43 | .dapm_routes = dir_routes, | ||
| 44 | .num_dapm_routes = ARRAY_SIZE(dir_routes), | ||
| 45 | }; | ||
| 31 | 46 | ||
| 32 | static struct snd_soc_dai_driver dir_stub_dai = { | 47 | static struct snd_soc_dai_driver dir_stub_dai = { |
| 33 | .name = "dir-hifi", | 48 | .name = "dir-hifi", |
diff --git a/sound/soc/codecs/spdif_transmitter.c b/sound/soc/codecs/spdif_transmitter.c index 18280499fd55..a078aa31052a 100644 --- a/sound/soc/codecs/spdif_transmitter.c +++ b/sound/soc/codecs/spdif_transmitter.c | |||
| @@ -25,10 +25,24 @@ | |||
| 25 | #define DRV_NAME "spdif-dit" | 25 | #define DRV_NAME "spdif-dit" |
| 26 | 26 | ||
| 27 | #define STUB_RATES SNDRV_PCM_RATE_8000_96000 | 27 | #define STUB_RATES SNDRV_PCM_RATE_8000_96000 |
| 28 | #define STUB_FORMATS SNDRV_PCM_FMTBIT_S16_LE | 28 | #define STUB_FORMATS (SNDRV_PCM_FMTBIT_S16_LE | \ |
| 29 | SNDRV_PCM_FMTBIT_S20_3LE | \ | ||
| 30 | SNDRV_PCM_FMTBIT_S24_LE) | ||
| 29 | 31 | ||
| 32 | static const struct snd_soc_dapm_widget dit_widgets[] = { | ||
| 33 | SND_SOC_DAPM_OUTPUT("spdif-out"), | ||
| 34 | }; | ||
| 35 | |||
| 36 | static const struct snd_soc_dapm_route dit_routes[] = { | ||
| 37 | { "spdif-out", NULL, "Playback" }, | ||
| 38 | }; | ||
| 30 | 39 | ||
| 31 | static struct snd_soc_codec_driver soc_codec_spdif_dit; | 40 | static struct snd_soc_codec_driver soc_codec_spdif_dit = { |
| 41 | .dapm_widgets = dit_widgets, | ||
| 42 | .num_dapm_widgets = ARRAY_SIZE(dit_widgets), | ||
| 43 | .dapm_routes = dit_routes, | ||
| 44 | .num_dapm_routes = ARRAY_SIZE(dit_routes), | ||
| 45 | }; | ||
| 32 | 46 | ||
| 33 | static struct snd_soc_dai_driver dit_stub_dai = { | 47 | static struct snd_soc_dai_driver dit_stub_dai = { |
| 34 | .name = "dit-hifi", | 48 | .name = "dit-hifi", |
