diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2013-07-03 19:52:22 -0700 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2013-07-03 19:52:22 -0700 |
commit | 1286da8bc009cb2aee7f285e94623fc974c0c983 (patch) | |
tree | 51ec0a79c3de63fa809b831ae0cbb5b85e44482f /sound/soc/codecs/spdif_transmitter.c | |
parent | 9e220385c4eb8b7e66174a60ea0e15b6b296f228 (diff) | |
parent | 1ba65ae4bdbd43265c51ee4c30ff21a48124b6d8 (diff) |
Merge tag 'sound-3.11' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound
Pull sound updates from Takashi Iwai:
"A relative calm release at this time with a flat diffstat. The only
significant change in the ALSA core side is the support for more than
32 card instances, configurable via kconfig. Other than that, in both
ASoC and other parts, mostly some improvements and fixes on the driver
side.
- hda: More quirks for ALC269-variants on Dell & co, VIA codec fixes
- hda: Haswell HDMI audio fixes, runtime PM improvements
- hda: Intel BayTrail support, ALC5505 DSP support
- es1968: MediaForte M56VAP support
- usb-audio: Improved support for Yamaha/Roland devices
- usb-audio: M2Tech hiFace, Audio Advantage Micro II support
- hdspm: wordclock fixes
- ASoC: Pending fixes for WM8962
- ASoC: Cleanups and fixes for Blackfin, SGTL5000 and UX500
- ASoC: Generalisation of the Bluetooth and HDMI stub drivers
- ASoC: SSM2518 and RT5640 codec drivers.
- ASoC: Tegra CPUs with RT5640 machine driver
- ASoC: AC'97 refactoring bug fixes
- ASoC: ADAU1701 driver fixes
- Clean up of *_set_drvdata() in a wide range of drivers"
* tag 'sound-3.11' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound: (284 commits)
ALSA: vmaster: Fix the regression of missing vmaster hook call
ALSA: hda - Add Dell SSID to support Headset Mic recording
ASoC: adau1701: remove control_data assignment
ASoC: adau1701: more direct regmap usage
ASoC: ac97: fixup multi-platform AC'97 module build failure
ASoC: pxa2xx: fixup multi-platform AC'97 build failures
ASoC: tegra20-ac97: Remove unused variable
ASoC: tegra20-ac97: Remove duplicate error message
ALSA: usb-audio: Add Audio Advantage Micro II
ASoC: tas5086: fix Mid-Z implementation
ASoC: tas5086: fix TAS5086_CLOCK_CONTROL register size
ALSA: Replace the magic number 44 with const
ALSA: hda - Fix the max length of control name in generic parser
ALSA: hda - Guess what, it's two more Dell headset mic quirks
ALSA: hda - Yet another Dell headset mic quirk
ALSA: hda - Add support for ALC5505 DSP power-save mode
ASoC: mfld: Remove unused variable
ALSA: usb-audio: add quirks for Roland QUAD/OCTO-CAPTURE
ALSA: usb-audio: claim autodetected PCM interfaces all at once
ALSA: usb-audio: remove superfluous Roland quirks
...
Diffstat (limited to 'sound/soc/codecs/spdif_transmitter.c')
-rw-r--r-- | sound/soc/codecs/spdif_transmitter.c | 79 |
1 files changed, 79 insertions, 0 deletions
diff --git a/sound/soc/codecs/spdif_transmitter.c b/sound/soc/codecs/spdif_transmitter.c new file mode 100644 index 00000000000..18280499fd5 --- /dev/null +++ b/sound/soc/codecs/spdif_transmitter.c @@ -0,0 +1,79 @@ +/* + * ALSA SoC SPDIF DIT driver + * + * This driver is used by controllers which can operate in DIT (SPDI/F) where + * no codec is needed. This file provides stub codec that can be used + * in these configurations. TI DaVinci Audio controller uses this driver. + * + * Author: Steve Chen, <schen@mvista.com> + * Copyright: (C) 2009 MontaVista Software, Inc., <source@mvista.com> + * Copyright: (C) 2009 Texas Instruments, India + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License version 2 as + * published by the Free Software Foundation. + */ + +#include <linux/module.h> +#include <linux/moduleparam.h> +#include <linux/slab.h> +#include <sound/soc.h> +#include <sound/pcm.h> +#include <sound/initval.h> +#include <linux/of.h> + +#define DRV_NAME "spdif-dit" + +#define STUB_RATES SNDRV_PCM_RATE_8000_96000 +#define STUB_FORMATS SNDRV_PCM_FMTBIT_S16_LE + + +static struct snd_soc_codec_driver soc_codec_spdif_dit; + +static struct snd_soc_dai_driver dit_stub_dai = { + .name = "dit-hifi", + .playback = { + .stream_name = "Playback", + .channels_min = 1, + .channels_max = 384, + .rates = STUB_RATES, + .formats = STUB_FORMATS, + }, +}; + +static int spdif_dit_probe(struct platform_device *pdev) +{ + return snd_soc_register_codec(&pdev->dev, &soc_codec_spdif_dit, + &dit_stub_dai, 1); +} + +static int spdif_dit_remove(struct platform_device *pdev) +{ + snd_soc_unregister_codec(&pdev->dev); + return 0; +} + +#ifdef CONFIG_OF +static const struct of_device_id spdif_dit_dt_ids[] = { + { .compatible = "linux,spdif-dit", }, + { } +}; +MODULE_DEVICE_TABLE(of, spdif_dit_dt_ids); +#endif + +static struct platform_driver spdif_dit_driver = { + .probe = spdif_dit_probe, + .remove = spdif_dit_remove, + .driver = { + .name = DRV_NAME, + .owner = THIS_MODULE, + .of_match_table = of_match_ptr(spdif_dit_dt_ids), + }, +}; + +module_platform_driver(spdif_dit_driver); + +MODULE_AUTHOR("Steve Chen <schen@mvista.com>"); +MODULE_DESCRIPTION("SPDIF dummy codec driver"); +MODULE_LICENSE("GPL"); +MODULE_ALIAS("platform:" DRV_NAME); |