Skip to content

Commit

Permalink
Merge remote-tracking branches 'asoc/topic/fsl-spdif', 'asoc/topic/fs…
Browse files Browse the repository at this point in the history
…l-ssi', 'asoc/topic/gtm601', 'asoc/topic/ics43432' and 'asoc/topic/ids' into asoc-next
  • Loading branch information
Mark Brown committed Aug 30, 2015
6 parents bb85d37 + 89e0e25 + dce0332 + 2002e90 + b37bfda + bf08f39 commit 246647e
Show file tree
Hide file tree
Showing 12 changed files with 265 additions and 6 deletions.
17 changes: 17 additions & 0 deletions Documentation/devicetree/bindings/sound/ics43432.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
Invensense ICS-43432 MEMS microphone with I2S output.

There are no software configuration options for this device, indeed, the only
host connection is the I2S interface. Apart from requirements on clock
frequency (460 kHz to 3.379 MHz according to the data sheet) there must be
64 clock cycles in each stereo output frame; 24 of the 32 available bits
contain audio data. A hardware pin determines if the device outputs data
on the left or right channel of the I2S frame.

Required properties:
- compatible : Must be "invensense,ics43432"

Example:

ics43432: ics43432 {
compatible = "invensense,ics43432";
};
2 changes: 2 additions & 0 deletions Documentation/devicetree/bindings/vendor-prefixes.txt
Original file line number Diff line number Diff line change
Expand Up @@ -110,6 +110,7 @@ ingenic Ingenic Semiconductor
innolux Innolux Corporation
intel Intel Corporation
intercontrol Inter Control Group
invensense InvenSense Inc.
isee ISEE 2007 S.L.
isil Intersil
karo Ka-Ro electronics GmbH
Expand Down Expand Up @@ -150,6 +151,7 @@ nvidia NVIDIA
nxp NXP Semiconductors
onnn ON Semiconductor Corp.
opencores OpenCores.org
option Option NV
ortustech Ortus Technology Co., Ltd.
ovti OmniVision Technologies
panasonic Panasonic Corporation
Expand Down
8 changes: 8 additions & 0 deletions sound/soc/codecs/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,8 @@ config SND_SOC_ALL_CODECS
select SND_SOC_BT_SCO
select SND_SOC_ES8328_SPI if SPI_MASTER
select SND_SOC_ES8328_I2C if I2C
select SND_SOC_GTM601
select SND_SOC_ICS43432
select SND_SOC_ISABELLE if I2C
select SND_SOC_JZ4740_CODEC
select SND_SOC_LM4857 if I2C
Expand Down Expand Up @@ -453,6 +455,12 @@ config SND_SOC_ES8328_SPI
tristate
select SND_SOC_ES8328

config SND_SOC_GTM601
tristate 'GTM601 UMTS modem audio codec'

config SND_SOC_ICS43432
tristate

config SND_SOC_ISABELLE
tristate

Expand Down
4 changes: 4 additions & 0 deletions sound/soc/codecs/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,8 @@ snd-soc-dmic-objs := dmic.o
snd-soc-es8328-objs := es8328.o
snd-soc-es8328-i2c-objs := es8328-i2c.o
snd-soc-es8328-spi-objs := es8328-spi.o
snd-soc-gtm601-objs := gtm601.o
snd-soc-ics43432-objs := ics43432.o
snd-soc-isabelle-objs := isabelle.o
snd-soc-jz4740-codec-objs := jz4740.o
snd-soc-l3-objs := l3.o
Expand Down Expand Up @@ -245,6 +247,8 @@ obj-$(CONFIG_SND_SOC_DMIC) += snd-soc-dmic.o
obj-$(CONFIG_SND_SOC_ES8328) += snd-soc-es8328.o
obj-$(CONFIG_SND_SOC_ES8328_I2C)+= snd-soc-es8328-i2c.o
obj-$(CONFIG_SND_SOC_ES8328_SPI)+= snd-soc-es8328-spi.o
obj-$(CONFIG_SND_SOC_GTM601) += snd-soc-gtm601.o
obj-$(CONFIG_SND_SOC_ICS43432) += snd-soc-ics43432.o
obj-$(CONFIG_SND_SOC_ISABELLE) += snd-soc-isabelle.o
obj-$(CONFIG_SND_SOC_JZ4740_CODEC) += snd-soc-jz4740-codec.o
obj-$(CONFIG_SND_SOC_L3) += snd-soc-l3.o
Expand Down
1 change: 1 addition & 0 deletions sound/soc/codecs/da9055.c
Original file line number Diff line number Diff line change
Expand Up @@ -1533,6 +1533,7 @@ static const struct of_device_id da9055_of_match[] = {
{ .compatible = "dlg,da9055-codec", },
{ }
};
MODULE_DEVICE_TABLE(of, da9055_of_match);

/* I2C codec control layer */
static struct i2c_driver da9055_i2c_driver = {
Expand Down
95 changes: 95 additions & 0 deletions sound/soc/codecs/gtm601.c
Original file line number Diff line number Diff line change
@@ -0,0 +1,95 @@
/*
* This is a simple driver for the GTM601 Voice PCM interface
*
* Copyright (C) 2015 Goldelico GmbH
*
* Author: Marek Belisko <marek@goldelico.com>
*
* Based on wm8727.c driver
*
* 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/init.h>
#include <linux/slab.h>
#include <linux/module.h>
#include <linux/kernel.h>
#include <linux/device.h>
#include <sound/core.h>
#include <sound/pcm.h>
#include <sound/ac97_codec.h>
#include <sound/initval.h>
#include <sound/soc.h>

static const struct snd_soc_dapm_widget gtm601_dapm_widgets[] = {
SND_SOC_DAPM_OUTPUT("AOUT"),
SND_SOC_DAPM_INPUT("AIN"),
};

static const struct snd_soc_dapm_route gtm601_dapm_routes[] = {
{ "AOUT", NULL, "Playback" },
{ "Capture", NULL, "AIN" },
};

static struct snd_soc_dai_driver gtm601_dai = {
.name = "gtm601",
.playback = {
.stream_name = "Playback",
.channels_min = 1,
.channels_max = 1,
.rates = SNDRV_PCM_RATE_8000,
.formats = SNDRV_PCM_FMTBIT_S16_LE,
},
.capture = {
.stream_name = "Capture",
.channels_min = 1,
.channels_max = 1,
.rates = SNDRV_PCM_RATE_8000,
.formats = SNDRV_PCM_FMTBIT_S16_LE,
},
};

static const struct snd_soc_codec_driver soc_codec_dev_gtm601 = {
.dapm_widgets = gtm601_dapm_widgets,
.num_dapm_widgets = ARRAY_SIZE(gtm601_dapm_widgets),
.dapm_routes = gtm601_dapm_routes,
.num_dapm_routes = ARRAY_SIZE(gtm601_dapm_routes),
};

static int gtm601_platform_probe(struct platform_device *pdev)
{
return snd_soc_register_codec(&pdev->dev,
&soc_codec_dev_gtm601, &gtm601_dai, 1);
}

static int gtm601_platform_remove(struct platform_device *pdev)
{
snd_soc_unregister_codec(&pdev->dev);
return 0;
}

#if defined(CONFIG_OF)
static const struct of_device_id gtm601_codec_of_match[] = {
{ .compatible = "option,gtm601", },
{},
};
MODULE_DEVICE_TABLE(of, gtm601_codec_of_match);
#endif

static struct platform_driver gtm601_codec_driver = {
.driver = {
.name = "gtm601",
.of_match_table = of_match_ptr(gtm601_codec_of_match),
},
.probe = gtm601_platform_probe,
.remove = gtm601_platform_remove,
};

module_platform_driver(gtm601_codec_driver);

MODULE_DESCRIPTION("ASoC gtm601 driver");
MODULE_AUTHOR("Marek Belisko <marek@goldelico.com>");
MODULE_LICENSE("GPL");
MODULE_ALIAS("platform:gtm601");
76 changes: 76 additions & 0 deletions sound/soc/codecs/ics43432.c
Original file line number Diff line number Diff line change
@@ -0,0 +1,76 @@
/*
* I2S MEMS microphone driver for InvenSense ICS-43432
*
* - Non configurable.
* - I2S interface, 64 BCLs per frame, 32 bits per channel, 24 bit data
*
* Copyright (c) 2015 Axis Communications AB
*
* Licensed under GPL v2.
*/

#include <linux/module.h>
#include <linux/init.h>
#include <linux/slab.h>
#include <sound/core.h>
#include <sound/pcm.h>
#include <sound/pcm_params.h>
#include <sound/soc.h>
#include <sound/initval.h>
#include <sound/tlv.h>

#define ICS43432_RATE_MIN 7190 /* Hz, from data sheet */
#define ICS43432_RATE_MAX 52800 /* Hz, from data sheet */

#define ICS43432_FORMATS (SNDRV_PCM_FMTBIT_S24_LE | SNDRV_PCM_FMTBIT_S32)

static struct snd_soc_dai_driver ics43432_dai = {
.name = "ics43432-hifi",
.capture = {
.stream_name = "Capture",
.channels_min = 1,
.channels_max = 2,
.rate_min = ICS43432_RATE_MIN,
.rate_max = ICS43432_RATE_MAX,
.rates = SNDRV_PCM_RATE_CONTINUOUS,
.formats = ICS43432_FORMATS,
},
};

static struct snd_soc_codec_driver ics43432_codec_driver = {
};

static int ics43432_probe(struct platform_device *pdev)
{
return snd_soc_register_codec(&pdev->dev, &ics43432_codec_driver,
&ics43432_dai, 1);
}

static int ics43432_remove(struct platform_device *pdev)
{
snd_soc_unregister_codec(&pdev->dev);
return 0;
}

#ifdef CONFIG_OF
static const struct of_device_id ics43432_ids[] = {
{ .compatible = "invensense,ics43432", },
{ }
};
MODULE_DEVICE_TABLE(of, ics43432_ids);
#endif

static struct platform_driver ics43432_driver = {
.driver = {
.name = "ics43432",
.of_match_table = of_match_ptr(ics43432_ids),
},
.probe = ics43432_probe,
.remove = ics43432_remove,
};

module_platform_driver(ics43432_driver);

MODULE_DESCRIPTION("ASoC ICS43432 driver");
MODULE_AUTHOR("Ricard Wanderlof <ricardw@axis.com>");
MODULE_LICENSE("GPL v2");
1 change: 1 addition & 0 deletions sound/soc/codecs/wm8510.c
Original file line number Diff line number Diff line change
Expand Up @@ -598,6 +598,7 @@ static const struct of_device_id wm8510_of_match[] = {
{ .compatible = "wlf,wm8510" },
{ },
};
MODULE_DEVICE_TABLE(of, wm8510_of_match);

static const struct regmap_config wm8510_regmap = {
.reg_bits = 7,
Expand Down
1 change: 1 addition & 0 deletions sound/soc/codecs/wm8523.c
Original file line number Diff line number Diff line change
Expand Up @@ -430,6 +430,7 @@ static const struct of_device_id wm8523_of_match[] = {
{ .compatible = "wlf,wm8523" },
{ },
};
MODULE_DEVICE_TABLE(of, wm8523_of_match);

static const struct regmap_config wm8523_regmap = {
.reg_bits = 8,
Expand Down
1 change: 1 addition & 0 deletions sound/soc/codecs/wm8580.c
Original file line number Diff line number Diff line change
Expand Up @@ -916,6 +916,7 @@ static const struct of_device_id wm8580_of_match[] = {
{ .compatible = "wlf,wm8580" },
{ },
};
MODULE_DEVICE_TABLE(of, wm8580_of_match);

static const struct regmap_config wm8580_regmap = {
.reg_bits = 7,
Expand Down
3 changes: 2 additions & 1 deletion sound/soc/fsl/fsl_spdif.c
Original file line number Diff line number Diff line change
Expand Up @@ -454,7 +454,8 @@ static int fsl_spdif_startup(struct snd_pcm_substream *substream,
struct fsl_spdif_priv *spdif_priv = snd_soc_dai_get_drvdata(rtd->cpu_dai);
struct platform_device *pdev = spdif_priv->pdev;
struct regmap *regmap = spdif_priv->regmap;
u32 scr, mask, i;
u32 scr, mask;
int i;
int ret;

/* Reset module and interrupts only for first initialization */
Expand Down
Loading

0 comments on commit 246647e

Please sign in to comment.