Skip to content

Commit

Permalink
Merge remote-tracking branches 'asoc/topic/dpcm', 'asoc/topic/es8328'…
Browse files Browse the repository at this point in the history
…, 'asoc/topic/extcon' and 'asoc/topic/fsl' into asoc-next
  • Loading branch information
broonie committed Dec 12, 2016
5 parents a3d9190 + 8528014 + 5841ce1 + efd95c7 + b3af6d3 commit fba3040
Show file tree
Hide file tree
Showing 8 changed files with 37 additions and 95 deletions.
8 changes: 5 additions & 3 deletions drivers/extcon/extcon-arizona.c
Original file line number Diff line number Diff line change
Expand Up @@ -274,17 +274,18 @@ static void arizona_extcon_pulse_micbias(struct arizona_extcon_info *info)
struct arizona *arizona = info->arizona;
const char *widget = arizona_extcon_get_micbias(info);
struct snd_soc_dapm_context *dapm = arizona->dapm;
struct snd_soc_component *component = snd_soc_dapm_to_component(dapm);
int ret;

ret = snd_soc_dapm_force_enable_pin(dapm, widget);
ret = snd_soc_component_force_enable_pin(component, widget);
if (ret != 0)
dev_warn(arizona->dev, "Failed to enable %s: %d\n",
widget, ret);

snd_soc_dapm_sync(dapm);

if (!arizona->pdata.micd_force_micbias) {
ret = snd_soc_dapm_disable_pin(arizona->dapm, widget);
ret = snd_soc_component_disable_pin(component, widget);
if (ret != 0)
dev_warn(arizona->dev, "Failed to disable %s: %d\n",
widget, ret);
Expand Down Expand Up @@ -349,14 +350,15 @@ static void arizona_stop_mic(struct arizona_extcon_info *info)
struct arizona *arizona = info->arizona;
const char *widget = arizona_extcon_get_micbias(info);
struct snd_soc_dapm_context *dapm = arizona->dapm;
struct snd_soc_component *component = snd_soc_dapm_to_component(dapm);
bool change;
int ret;

regmap_update_bits_check(arizona->regmap, ARIZONA_MIC_DETECT_1,
ARIZONA_MICD_ENA, 0,
&change);

ret = snd_soc_dapm_disable_pin(dapm, widget);
ret = snd_soc_component_disable_pin(component, widget);
if (ret != 0)
dev_warn(arizona->dev,
"Failed to disable %s: %d\n",
Expand Down
22 changes: 21 additions & 1 deletion sound/soc/codecs/ak4641.c
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,27 @@
#include <sound/tlv.h>
#include <sound/ak4641.h>

#include "ak4641.h"
/* AK4641 register space */
#define AK4641_PM1 0x00
#define AK4641_PM2 0x01
#define AK4641_SIG1 0x02
#define AK4641_SIG2 0x03
#define AK4641_MODE1 0x04
#define AK4641_MODE2 0x05
#define AK4641_DAC 0x06
#define AK4641_MIC 0x07
#define AK4641_TIMER 0x08
#define AK4641_ALC1 0x09
#define AK4641_ALC2 0x0a
#define AK4641_PGA 0x0b
#define AK4641_LATT 0x0c
#define AK4641_RATT 0x0d
#define AK4641_VOL 0x0e
#define AK4641_STATUS 0x0f
#define AK4641_EQLO 0x10
#define AK4641_EQMID 0x11
#define AK4641_EQHI 0x12
#define AK4641_BTIF 0x13

/* codec private data */
struct ak4641_priv {
Expand Down
47 changes: 0 additions & 47 deletions sound/soc/codecs/ak4641.h

This file was deleted.

37 changes: 0 additions & 37 deletions sound/soc/codecs/es8328.h
Original file line number Diff line number Diff line change
Expand Up @@ -278,43 +278,6 @@ int es8328_probe(struct device *dev, struct regmap *regmap);

#define ES8328_REG_MAX 0x35

#define ES8328_PLL1 0
#define ES8328_PLL2 1

/* clock inputs */
#define ES8328_MCLK 0
#define ES8328_PCMCLK 1

/* clock divider id's */
#define ES8328_PCMDIV 0
#define ES8328_BCLKDIV 1
#define ES8328_VXCLKDIV 2

/* PCM clock dividers */
#define ES8328_PCM_DIV_1 (0 << 6)
#define ES8328_PCM_DIV_3 (2 << 6)
#define ES8328_PCM_DIV_5_5 (3 << 6)
#define ES8328_PCM_DIV_2 (4 << 6)
#define ES8328_PCM_DIV_4 (5 << 6)
#define ES8328_PCM_DIV_6 (6 << 6)
#define ES8328_PCM_DIV_8 (7 << 6)

/* BCLK clock dividers */
#define ES8328_BCLK_DIV_1 (0 << 7)
#define ES8328_BCLK_DIV_2 (1 << 7)
#define ES8328_BCLK_DIV_4 (2 << 7)
#define ES8328_BCLK_DIV_8 (3 << 7)

/* VXCLK clock dividers */
#define ES8328_VXCLK_DIV_1 (0 << 6)
#define ES8328_VXCLK_DIV_2 (1 << 6)
#define ES8328_VXCLK_DIV_4 (2 << 6)
#define ES8328_VXCLK_DIV_8 (3 << 6)
#define ES8328_VXCLK_DIV_16 (4 << 6)

#define ES8328_DAI_HIFI 0
#define ES8328_DAI_VOICE 1

#define ES8328_1536FS 1536
#define ES8328_1024FS 1024
#define ES8328_768FS 768
Expand Down
1 change: 1 addition & 0 deletions sound/soc/fsl/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@ config SND_SOC_FSL_SPDIF
select REGMAP_MMIO
select SND_SOC_IMX_PCM_DMA if SND_IMX_SOC != n
select SND_SOC_IMX_PCM_FIQ if SND_IMX_SOC != n && (MXC_TZIC || MXC_AVIC)
select BITREVERSE
help
Say Y if you want to add Sony/Philips Digital Interface (SPDIF)
support for the Freescale CPUs.
Expand Down
13 changes: 9 additions & 4 deletions sound/soc/mxs/mxs-saif.c
Original file line number Diff line number Diff line change
Expand Up @@ -735,6 +735,11 @@ static int mxs_saif_probe(struct platform_device *pdev)
else
saif->id = ret;

if (saif->id >= ARRAY_SIZE(mxs_saif)) {
dev_err(&pdev->dev, "get wrong saif id\n");
return -EINVAL;
}

/*
* If there is no "fsl,saif-master" phandle, it's a saif
* master. Otherwise, it's a slave and its phandle points
Expand All @@ -749,11 +754,11 @@ static int mxs_saif_probe(struct platform_device *pdev)
return ret;
else
saif->master_id = ret;
}

if (saif->master_id >= ARRAY_SIZE(mxs_saif)) {
dev_err(&pdev->dev, "get wrong master id\n");
return -EINVAL;
if (saif->master_id >= ARRAY_SIZE(mxs_saif)) {
dev_err(&pdev->dev, "get wrong master id\n");
return -EINVAL;
}
}

mxs_saif[saif->id] = saif;
Expand Down
2 changes: 0 additions & 2 deletions sound/soc/pxa/hx4700.c
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,6 @@
#include <asm/mach-types.h>
#include "pxa2xx-i2s.h"

#include "../codecs/ak4641.h"

static struct snd_soc_jack hs_jack;

/* Headphones jack detection DAPM pin */
Expand Down
2 changes: 1 addition & 1 deletion sound/soc/soc-pcm.c
Original file line number Diff line number Diff line change
Expand Up @@ -2882,7 +2882,7 @@ int snd_soc_platform_trigger(struct snd_pcm_substream *substream,
EXPORT_SYMBOL_GPL(snd_soc_platform_trigger);

#ifdef CONFIG_DEBUG_FS
static char *dpcm_state_string(enum snd_soc_dpcm_state state)
static const char *dpcm_state_string(enum snd_soc_dpcm_state state)
{
switch (state) {
case SND_SOC_DPCM_STATE_NEW:
Expand Down

0 comments on commit fba3040

Please sign in to comment.