diff options
| -rw-r--r-- | sound/soc/blackfin/Kconfig | 3 | ||||
| -rw-r--r-- | sound/soc/codecs/Kconfig | 11 | ||||
| -rw-r--r-- | sound/soc/codecs/Makefile | 4 | ||||
| -rw-r--r-- | sound/soc/codecs/adav801.c | 53 | ||||
| -rw-r--r-- | sound/soc/codecs/adav803.c | 50 | ||||
| -rw-r--r-- | sound/soc/codecs/adav80x.c | 117 | ||||
| -rw-r--r-- | sound/soc/codecs/adav80x.h | 7 |
7 files changed, 133 insertions, 112 deletions
diff --git a/sound/soc/blackfin/Kconfig b/sound/soc/blackfin/Kconfig index 54f74f8cbb75..18abd884d84f 100644 --- a/sound/soc/blackfin/Kconfig +++ b/sound/soc/blackfin/Kconfig | |||
| @@ -47,7 +47,8 @@ config SND_SOC_BFIN_EVAL_ADAV80X | |||
| 47 | tristate "Support for the EVAL-ADAV80X boards on Blackfin eval boards" | 47 | tristate "Support for the EVAL-ADAV80X boards on Blackfin eval boards" |
| 48 | depends on SND_BF5XX_I2S && (SPI_MASTER || I2C) | 48 | depends on SND_BF5XX_I2S && (SPI_MASTER || I2C) |
| 49 | select SND_BF5XX_SOC_I2S | 49 | select SND_BF5XX_SOC_I2S |
| 50 | select SND_SOC_ADAV80X | 50 | select SND_SOC_ADAV801 if SPI_MASTER |
| 51 | select SND_SOC_ADAV803 if I2C | ||
| 51 | help | 52 | help |
| 52 | Say Y if you want to add support for the Analog Devices EVAL-ADAV801 or | 53 | Say Y if you want to add support for the Analog Devices EVAL-ADAV801 or |
| 53 | EVAL-ADAV803 board connected to one of the Blackfin evaluation boards | 54 | EVAL-ADAV803 board connected to one of the Blackfin evaluation boards |
diff --git a/sound/soc/codecs/Kconfig b/sound/soc/codecs/Kconfig index 983d087aa92a..9556321c7b8b 100644 --- a/sound/soc/codecs/Kconfig +++ b/sound/soc/codecs/Kconfig | |||
| @@ -20,7 +20,8 @@ config SND_SOC_ALL_CODECS | |||
| 20 | select SND_SOC_AD1980 if SND_SOC_AC97_BUS | 20 | select SND_SOC_AD1980 if SND_SOC_AC97_BUS |
| 21 | select SND_SOC_AD73311 | 21 | select SND_SOC_AD73311 |
| 22 | select SND_SOC_ADAU1373 if I2C | 22 | select SND_SOC_ADAU1373 if I2C |
| 23 | select SND_SOC_ADAV80X if SND_SOC_I2C_AND_SPI | 23 | select SND_SOC_ADAV801 if SPI_MASTER |
| 24 | select SND_SOC_ADAV803 if I2C | ||
| 24 | select SND_SOC_ADAU1701 if I2C | 25 | select SND_SOC_ADAU1701 if I2C |
| 25 | select SND_SOC_ADS117X | 26 | select SND_SOC_ADS117X |
| 26 | select SND_SOC_AK4104 if SPI_MASTER | 27 | select SND_SOC_AK4104 if SPI_MASTER |
| @@ -198,6 +199,14 @@ config SND_SOC_ADAU1373 | |||
| 198 | config SND_SOC_ADAV80X | 199 | config SND_SOC_ADAV80X |
| 199 | tristate | 200 | tristate |
| 200 | 201 | ||
| 202 | config SND_SOC_ADAV801 | ||
| 203 | tristate | ||
| 204 | select SND_SOC_ADAV80X | ||
| 205 | |||
| 206 | config SND_SOC_ADAV803 | ||
| 207 | tristate | ||
| 208 | select SND_SOC_ADAV80X | ||
| 209 | |||
| 201 | config SND_SOC_ADS117X | 210 | config SND_SOC_ADS117X |
| 202 | tristate | 211 | tristate |
| 203 | 212 | ||
diff --git a/sound/soc/codecs/Makefile b/sound/soc/codecs/Makefile index bc126764a44d..1b2c6eca863f 100644 --- a/sound/soc/codecs/Makefile +++ b/sound/soc/codecs/Makefile | |||
| @@ -8,6 +8,8 @@ snd-soc-ad73311-objs := ad73311.o | |||
| 8 | snd-soc-adau1701-objs := adau1701.o | 8 | snd-soc-adau1701-objs := adau1701.o |
| 9 | snd-soc-adau1373-objs := adau1373.o | 9 | snd-soc-adau1373-objs := adau1373.o |
| 10 | snd-soc-adav80x-objs := adav80x.o | 10 | snd-soc-adav80x-objs := adav80x.o |
| 11 | snd-soc-adav801-objs := adav801.o | ||
| 12 | snd-soc-adav803-objs := adav803.o | ||
| 11 | snd-soc-ads117x-objs := ads117x.o | 13 | snd-soc-ads117x-objs := ads117x.o |
| 12 | snd-soc-ak4104-objs := ak4104.o | 14 | snd-soc-ak4104-objs := ak4104.o |
| 13 | snd-soc-ak4535-objs := ak4535.o | 15 | snd-soc-ak4535-objs := ak4535.o |
| @@ -139,6 +141,8 @@ obj-$(CONFIG_SND_SOC_AD73311) += snd-soc-ad73311.o | |||
| 139 | obj-$(CONFIG_SND_SOC_ADAU1373) += snd-soc-adau1373.o | 141 | obj-$(CONFIG_SND_SOC_ADAU1373) += snd-soc-adau1373.o |
| 140 | obj-$(CONFIG_SND_SOC_ADAU1701) += snd-soc-adau1701.o | 142 | obj-$(CONFIG_SND_SOC_ADAU1701) += snd-soc-adau1701.o |
| 141 | obj-$(CONFIG_SND_SOC_ADAV80X) += snd-soc-adav80x.o | 143 | obj-$(CONFIG_SND_SOC_ADAV80X) += snd-soc-adav80x.o |
| 144 | obj-$(CONFIG_SND_SOC_ADAV801) += snd-soc-adav801.o | ||
| 145 | obj-$(CONFIG_SND_SOC_ADAV803) += snd-soc-adav803.o | ||
| 142 | obj-$(CONFIG_SND_SOC_ADS117X) += snd-soc-ads117x.o | 146 | obj-$(CONFIG_SND_SOC_ADS117X) += snd-soc-ads117x.o |
| 143 | obj-$(CONFIG_SND_SOC_AK4104) += snd-soc-ak4104.o | 147 | obj-$(CONFIG_SND_SOC_AK4104) += snd-soc-ak4104.o |
| 144 | obj-$(CONFIG_SND_SOC_AK4535) += snd-soc-ak4535.o | 148 | obj-$(CONFIG_SND_SOC_AK4535) += snd-soc-ak4535.o |
diff --git a/sound/soc/codecs/adav801.c b/sound/soc/codecs/adav801.c new file mode 100644 index 000000000000..790fce33ab10 --- /dev/null +++ b/sound/soc/codecs/adav801.c | |||
| @@ -0,0 +1,53 @@ | |||
| 1 | /* | ||
| 2 | * ADAV801 audio driver | ||
| 3 | * | ||
| 4 | * Copyright 2014 Analog Devices Inc. | ||
| 5 | * | ||
| 6 | * Licensed under the GPL-2. | ||
| 7 | */ | ||
| 8 | |||
| 9 | #include <linux/module.h> | ||
| 10 | #include <linux/spi/spi.h> | ||
| 11 | #include <linux/regmap.h> | ||
| 12 | |||
| 13 | #include <sound/soc.h> | ||
| 14 | |||
| 15 | #include "adav80x.h" | ||
| 16 | |||
| 17 | static const struct spi_device_id adav80x_spi_id[] = { | ||
| 18 | { "adav801", 0 }, | ||
| 19 | { } | ||
| 20 | }; | ||
| 21 | MODULE_DEVICE_TABLE(spi, adav80x_spi_id); | ||
| 22 | |||
| 23 | static int adav80x_spi_probe(struct spi_device *spi) | ||
| 24 | { | ||
| 25 | struct regmap_config config; | ||
| 26 | |||
| 27 | config = adav80x_regmap_config; | ||
| 28 | config.read_flag_mask = 0x01; | ||
| 29 | |||
| 30 | return adav80x_bus_probe(&spi->dev, devm_regmap_init_spi(spi, &config)); | ||
| 31 | } | ||
| 32 | |||
| 33 | static int adav80x_spi_remove(struct spi_device *spi) | ||
| 34 | { | ||
| 35 | snd_soc_unregister_codec(&spi->dev); | ||
| 36 | return 0; | ||
| 37 | } | ||
| 38 | |||
| 39 | static struct spi_driver adav80x_spi_driver = { | ||
| 40 | .driver = { | ||
| 41 | .name = "adav801", | ||
| 42 | .owner = THIS_MODULE, | ||
| 43 | }, | ||
| 44 | .probe = adav80x_spi_probe, | ||
| 45 | .remove = adav80x_spi_remove, | ||
| 46 | .id_table = adav80x_spi_id, | ||
| 47 | }; | ||
| 48 | module_spi_driver(adav80x_spi_driver); | ||
| 49 | |||
| 50 | MODULE_DESCRIPTION("ASoC ADAV801 driver"); | ||
| 51 | MODULE_AUTHOR("Lars-Peter Clausen <lars@metafoo.de>"); | ||
| 52 | MODULE_AUTHOR("Yi Li <yi.li@analog.com>>"); | ||
| 53 | MODULE_LICENSE("GPL"); | ||
diff --git a/sound/soc/codecs/adav803.c b/sound/soc/codecs/adav803.c new file mode 100644 index 000000000000..66d9fce34e62 --- /dev/null +++ b/sound/soc/codecs/adav803.c | |||
| @@ -0,0 +1,50 @@ | |||
| 1 | /* | ||
| 2 | * ADAV803 audio driver | ||
| 3 | * | ||
| 4 | * Copyright 2014 Analog Devices Inc. | ||
| 5 | * | ||
| 6 | * Licensed under the GPL-2. | ||
| 7 | */ | ||
| 8 | |||
| 9 | #include <linux/module.h> | ||
| 10 | #include <linux/i2c.h> | ||
| 11 | #include <linux/regmap.h> | ||
| 12 | |||
| 13 | #include <sound/soc.h> | ||
| 14 | |||
| 15 | #include "adav80x.h" | ||
| 16 | |||
| 17 | static const struct i2c_device_id adav803_id[] = { | ||
| 18 | { "adav803", 0 }, | ||
| 19 | { } | ||
| 20 | }; | ||
| 21 | MODULE_DEVICE_TABLE(i2c, adav803_id); | ||
| 22 | |||
| 23 | static int adav803_probe(struct i2c_client *client, | ||
| 24 | const struct i2c_device_id *id) | ||
| 25 | { | ||
| 26 | return adav80x_bus_probe(&client->dev, | ||
| 27 | devm_regmap_init_i2c(client, &adav80x_regmap_config)); | ||
| 28 | } | ||
| 29 | |||
| 30 | static int adav803_remove(struct i2c_client *client) | ||
| 31 | { | ||
| 32 | snd_soc_unregister_codec(&client->dev); | ||
| 33 | return 0; | ||
| 34 | } | ||
| 35 | |||
| 36 | static struct i2c_driver adav803_driver = { | ||
| 37 | .driver = { | ||
| 38 | .name = "adav803", | ||
| 39 | .owner = THIS_MODULE, | ||
| 40 | }, | ||
| 41 | .probe = adav803_probe, | ||
| 42 | .remove = adav803_remove, | ||
| 43 | .id_table = adav803_id, | ||
| 44 | }; | ||
| 45 | module_i2c_driver(adav803_driver); | ||
| 46 | |||
| 47 | MODULE_DESCRIPTION("ASoC ADAV803 driver"); | ||
| 48 | MODULE_AUTHOR("Lars-Peter Clausen <lars@metafoo.de>"); | ||
| 49 | MODULE_AUTHOR("Yi Li <yi.li@analog.com>>"); | ||
| 50 | MODULE_LICENSE("GPL"); | ||
diff --git a/sound/soc/codecs/adav80x.c b/sound/soc/codecs/adav80x.c index a4bd051c5430..09d560962e8d 100644 --- a/sound/soc/codecs/adav80x.c +++ b/sound/soc/codecs/adav80x.c | |||
| @@ -8,17 +8,15 @@ | |||
| 8 | * Licensed under the GPL-2 or later. | 8 | * Licensed under the GPL-2 or later. |
| 9 | */ | 9 | */ |
| 10 | 10 | ||
| 11 | #include <linux/init.h> | ||
| 12 | #include <linux/module.h> | 11 | #include <linux/module.h> |
| 13 | #include <linux/kernel.h> | 12 | #include <linux/kernel.h> |
| 14 | #include <linux/i2c.h> | 13 | #include <linux/regmap.h> |
| 15 | #include <linux/spi/spi.h> | ||
| 16 | #include <linux/slab.h> | 14 | #include <linux/slab.h> |
| 17 | #include <sound/core.h> | 15 | |
| 18 | #include <sound/pcm.h> | 16 | #include <sound/pcm.h> |
