Skip to content

Commit

Permalink
Merge branch 'asoc-4.17' into asoc-linus
Browse files Browse the repository at this point in the history
  • Loading branch information
broonie committed Jun 5, 2018
2 parents 29dcea8 + c90ddb6 commit 2858e2c
Show file tree
Hide file tree
Showing 11 changed files with 65 additions and 55 deletions.
3 changes: 3 additions & 0 deletions .mailmap
Original file line number Diff line number Diff line change
Expand Up @@ -186,6 +186,9 @@ Uwe Kleine-König <[email protected]>
Uwe Kleine-König <[email protected]>
Uwe Kleine-König <[email protected]>
Valdis Kletnieks <[email protected]>
Vinod Koul <[email protected]> <[email protected]>
Vinod Koul <[email protected]> <[email protected]>
Vinod Koul <[email protected]> <[email protected]>
Viresh Kumar <[email protected]> <[email protected]>
Viresh Kumar <[email protected]> <[email protected]>
Viresh Kumar <[email protected]> <[email protected]>
Expand Down
11 changes: 5 additions & 6 deletions MAINTAINERS
Original file line number Diff line number Diff line change
Expand Up @@ -7034,14 +7034,13 @@ L: [email protected]
S: Maintained
F: drivers/video/fbdev/i810/

INTEL ASoC BDW/HSW DRIVERS
INTEL ASoC DRIVERS
M: Pierre-Louis Bossart <[email protected]>
M: Liam Girdwood <[email protected]>
M: Jie Yang <[email protected]>
L: [email protected] (moderated for non-subscribers)
S: Supported
F: sound/soc/intel/common/sst-dsp*
F: sound/soc/intel/common/sst-firmware.c
F: sound/soc/intel/boards/broadwell.c
F: sound/soc/intel/haswell/
F: sound/soc/intel/

INTEL C600 SERIES SAS CONTROLLER DRIVER
M: Intel SCU Linux support <[email protected]>
Expand Down Expand Up @@ -13105,7 +13104,7 @@ F: include/uapi/sound/
F: sound/

SOUND - COMPRESSED AUDIO
M: Vinod Koul <[email protected]>
M: Vinod Koul <[email protected]>
L: [email protected] (moderated for non-subscribers)
T: git git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound.git
S: Supported
Expand Down
4 changes: 2 additions & 2 deletions include/sound/soc-dai.h
Original file line number Diff line number Diff line change
Expand Up @@ -294,8 +294,8 @@ struct snd_soc_dai {
struct snd_soc_dai_driver *driver;

/* DAI runtime info */
unsigned int capture_active:1; /* stream is in use */
unsigned int playback_active:1; /* stream is in use */
unsigned int capture_active; /* stream usage count */
unsigned int playback_active; /* stream usage count */
unsigned int probed:1;

unsigned int active;
Expand Down
2 changes: 1 addition & 1 deletion sound/soc/cirrus/edb93xx.c
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ static struct snd_soc_dai_link edb93xx_dai = {
.cpu_dai_name = "ep93xx-i2s",
.codec_name = "spi0.0",
.codec_dai_name = "cs4271-hifi",
.dai_fmt = SND_SOC_DAIFMT_I2S | SND_SOC_DAIFMT_NB_IF |
.dai_fmt = SND_SOC_DAIFMT_I2S | SND_SOC_DAIFMT_NB_NF |
SND_SOC_DAIFMT_CBS_CFS,
.ops = &edb93xx_ops,
};
Expand Down
26 changes: 14 additions & 12 deletions sound/soc/cirrus/ep93xx-i2s.c
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,9 @@
#define EP93XX_I2S_WRDLEN_24 (1 << 0)
#define EP93XX_I2S_WRDLEN_32 (2 << 0)

#define EP93XX_I2S_LINCTRLDATA_R_JUST (1 << 2) /* Right justify */
#define EP93XX_I2S_RXLINCTRLDATA_R_JUST BIT(1) /* Right justify */

#define EP93XX_I2S_TXLINCTRLDATA_R_JUST BIT(2) /* Right justify */

#define EP93XX_I2S_CLKCFG_LRS (1 << 0) /* lrclk polarity */
#define EP93XX_I2S_CLKCFG_CKP (1 << 1) /* Bit clock polarity */
Expand Down Expand Up @@ -170,25 +172,25 @@ static int ep93xx_i2s_set_dai_fmt(struct snd_soc_dai *cpu_dai,
unsigned int fmt)
{
struct ep93xx_i2s_info *info = snd_soc_dai_get_drvdata(cpu_dai);
unsigned int clk_cfg, lin_ctrl;
unsigned int clk_cfg;
unsigned int txlin_ctrl = 0;
unsigned int rxlin_ctrl = 0;

clk_cfg = ep93xx_i2s_read_reg(info, EP93XX_I2S_RXCLKCFG);
lin_ctrl = ep93xx_i2s_read_reg(info, EP93XX_I2S_RXLINCTRLDATA);

switch (fmt & SND_SOC_DAIFMT_FORMAT_MASK) {
case SND_SOC_DAIFMT_I2S:
clk_cfg |= EP93XX_I2S_CLKCFG_REL;
lin_ctrl &= ~EP93XX_I2S_LINCTRLDATA_R_JUST;
break;

case SND_SOC_DAIFMT_LEFT_J:
clk_cfg &= ~EP93XX_I2S_CLKCFG_REL;
lin_ctrl &= ~EP93XX_I2S_LINCTRLDATA_R_JUST;
break;

case SND_SOC_DAIFMT_RIGHT_J:
clk_cfg &= ~EP93XX_I2S_CLKCFG_REL;
lin_ctrl |= EP93XX_I2S_LINCTRLDATA_R_JUST;
rxlin_ctrl |= EP93XX_I2S_RXLINCTRLDATA_R_JUST;
txlin_ctrl |= EP93XX_I2S_TXLINCTRLDATA_R_JUST;
break;

default:
Expand All @@ -213,32 +215,32 @@ static int ep93xx_i2s_set_dai_fmt(struct snd_soc_dai *cpu_dai,
switch (fmt & SND_SOC_DAIFMT_INV_MASK) {
case SND_SOC_DAIFMT_NB_NF:
/* Negative bit clock, lrclk low on left word */
clk_cfg &= ~(EP93XX_I2S_CLKCFG_CKP | EP93XX_I2S_CLKCFG_REL);
clk_cfg &= ~(EP93XX_I2S_CLKCFG_CKP | EP93XX_I2S_CLKCFG_LRS);
break;

case SND_SOC_DAIFMT_NB_IF:
/* Negative bit clock, lrclk low on right word */
clk_cfg &= ~EP93XX_I2S_CLKCFG_CKP;
clk_cfg |= EP93XX_I2S_CLKCFG_REL;
clk_cfg |= EP93XX_I2S_CLKCFG_LRS;
break;

case SND_SOC_DAIFMT_IB_NF:
/* Positive bit clock, lrclk low on left word */
clk_cfg |= EP93XX_I2S_CLKCFG_CKP;
clk_cfg &= ~EP93XX_I2S_CLKCFG_REL;
clk_cfg &= ~EP93XX_I2S_CLKCFG_LRS;
break;

case SND_SOC_DAIFMT_IB_IF:
/* Positive bit clock, lrclk low on right word */
clk_cfg |= EP93XX_I2S_CLKCFG_CKP | EP93XX_I2S_CLKCFG_REL;
clk_cfg |= EP93XX_I2S_CLKCFG_CKP | EP93XX_I2S_CLKCFG_LRS;
break;
}

/* Write new register values */
ep93xx_i2s_write_reg(info, EP93XX_I2S_RXCLKCFG, clk_cfg);
ep93xx_i2s_write_reg(info, EP93XX_I2S_TXCLKCFG, clk_cfg);
ep93xx_i2s_write_reg(info, EP93XX_I2S_RXLINCTRLDATA, lin_ctrl);
ep93xx_i2s_write_reg(info, EP93XX_I2S_TXLINCTRLDATA, lin_ctrl);
ep93xx_i2s_write_reg(info, EP93XX_I2S_RXLINCTRLDATA, rxlin_ctrl);
ep93xx_i2s_write_reg(info, EP93XX_I2S_TXLINCTRLDATA, txlin_ctrl);
return 0;
}

Expand Down
2 changes: 1 addition & 1 deletion sound/soc/cirrus/snappercl15.c
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ static struct snd_soc_dai_link snappercl15_dai = {
.codec_dai_name = "tlv320aic23-hifi",
.codec_name = "tlv320aic23-codec.0-001a",
.platform_name = "ep93xx-i2s",
.dai_fmt = SND_SOC_DAIFMT_I2S | SND_SOC_DAIFMT_NB_IF |
.dai_fmt = SND_SOC_DAIFMT_I2S | SND_SOC_DAIFMT_NB_NF |
SND_SOC_DAIFMT_CBS_CFS,
.ops = &snappercl15_ops,
};
Expand Down
1 change: 1 addition & 0 deletions sound/soc/codecs/cs35l35.c
Original file line number Diff line number Diff line change
Expand Up @@ -1105,6 +1105,7 @@ static struct regmap_config cs35l35_regmap = {
.readable_reg = cs35l35_readable_register,
.precious_reg = cs35l35_precious_register,
.cache_type = REGCACHE_RBTREE,
.use_single_rw = true,
};

static irqreturn_t cs35l35_irq(int irq, void *data)
Expand Down
5 changes: 3 additions & 2 deletions sound/soc/intel/boards/bytcr_rt5651.c
Original file line number Diff line number Diff line change
Expand Up @@ -856,9 +856,10 @@ static int snd_byt_rt5651_mc_probe(struct platform_device *pdev)
if (byt_rt5651_quirk & BYT_RT5651_MCLK_EN) {
priv->mclk = devm_clk_get(&pdev->dev, "pmc_plt_clk_3");
if (IS_ERR(priv->mclk)) {
ret_val = PTR_ERR(priv->mclk);
dev_err(&pdev->dev,
"Failed to get MCLK from pmc_plt_clk_3: %ld\n",
PTR_ERR(priv->mclk));
"Failed to get MCLK from pmc_plt_clk_3: %d\n",
ret_val);
/*
* Fall back to bit clock usage for -ENOENT (clock not
* available likely due to missing dependencies), bail
Expand Down
4 changes: 2 additions & 2 deletions sound/soc/mediatek/common/mtk-afe-platform-driver.c
Original file line number Diff line number Diff line change
Expand Up @@ -64,14 +64,14 @@ static const struct snd_pcm_ops mtk_afe_pcm_ops = {
static int mtk_afe_pcm_new(struct snd_soc_pcm_runtime *rtd)
{
size_t size;
struct snd_card *card = rtd->card->snd_card;
struct snd_pcm *pcm = rtd->pcm;
struct snd_soc_component *component = snd_soc_rtdcom_lookup(rtd, AFE_PCM_NAME);
struct mtk_base_afe *afe = snd_soc_component_get_drvdata(component);

size = afe->mtk_afe_hardware->buffer_bytes_max;
return snd_pcm_lib_preallocate_pages_for_all(pcm, SNDRV_DMA_TYPE_DEV,
card->dev, size, size);
rtd->platform->dev,
size, size);
}

static void mtk_afe_pcm_free(struct snd_pcm *pcm)
Expand Down
10 changes: 5 additions & 5 deletions sound/soc/omap/n810.c
Original file line number Diff line number Diff line change
Expand Up @@ -231,8 +231,8 @@ static const struct snd_soc_dapm_route audio_map[] = {
{"Ext Spk", NULL, "LLOUT"},
{"Ext Spk", NULL, "RLOUT"},

{"DMic Rate 64", NULL, "Mic Bias"},
{"Mic Bias", NULL, "DMic"},
{"DMic Rate 64", NULL, "DMic"},
{"DMic", NULL, "Mic Bias"},
};

static const char *spk_function[] = {"Off", "On"};
Expand All @@ -257,9 +257,9 @@ static const struct snd_kcontrol_new aic33_n810_controls[] = {
static struct snd_soc_dai_link n810_dai = {
.name = "TLV320AIC33",
.stream_name = "AIC33",
.cpu_dai_name = "omap-mcbsp.2",
.platform_name = "omap-mcbsp.2",
.codec_name = "tlv320aic3x-codec.2-0018",
.cpu_dai_name = "48076000.mcbsp",
.platform_name = "48076000.mcbsp",
.codec_name = "tlv320aic3x-codec.1-0018",
.codec_dai_name = "tlv320aic3x-hifi",
.dai_fmt = SND_SOC_DAIFMT_I2S | SND_SOC_DAIFMT_NB_NF |
SND_SOC_DAIFMT_CBM_CFM,
Expand Down
52 changes: 28 additions & 24 deletions sound/soc/soc-compress.c
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ static int soc_compr_open(struct snd_compr_stream *cstream)
struct snd_soc_component *component;
struct snd_soc_rtdcom_list *rtdcom;
struct snd_soc_dai *cpu_dai = rtd->cpu_dai;
int ret = 0, __ret;
int ret;

mutex_lock_nested(&rtd->pcm_mutex, rtd->pcm_subclass);

Expand Down Expand Up @@ -68,16 +68,15 @@ static int soc_compr_open(struct snd_compr_stream *cstream)
!component->driver->compr_ops->open)
continue;

__ret = component->driver->compr_ops->open(cstream);
if (__ret < 0) {
ret = component->driver->compr_ops->open(cstream);
if (ret < 0) {
dev_err(component->dev,
"Compress ASoC: can't open platform %s: %d\n",
component->name, __ret);
ret = __ret;
component->name, ret);
goto machine_err;
}
}
if (ret < 0)
goto machine_err;
component = NULL;

if (rtd->dai_link->compr_ops && rtd->dai_link->compr_ops->startup) {
ret = rtd->dai_link->compr_ops->startup(cstream);
Expand All @@ -97,17 +96,20 @@ static int soc_compr_open(struct snd_compr_stream *cstream)

machine_err:
for_each_rtdcom(rtd, rtdcom) {
component = rtdcom->component;
struct snd_soc_component *err_comp = rtdcom->component;

if (err_comp == component)
break;

/* ignore duplication for now */
if (platform && (component == &platform->component))
if (platform && (err_comp == &platform->component))
continue;

if (!component->driver->compr_ops ||
!component->driver->compr_ops->free)
if (!err_comp->driver->compr_ops ||
!err_comp->driver->compr_ops->free)
continue;

component->driver->compr_ops->free(cstream);
err_comp->driver->compr_ops->free(cstream);
}

if (platform && platform->driver->compr_ops && platform->driver->compr_ops->free)
Expand All @@ -132,7 +134,7 @@ static int soc_compr_open_fe(struct snd_compr_stream *cstream)
struct snd_soc_dpcm *dpcm;
struct snd_soc_dapm_widget_list *list;
int stream;
int ret = 0, __ret;
int ret;

if (cstream->direction == SND_COMPRESS_PLAYBACK)
stream = SNDRV_PCM_STREAM_PLAYBACK;
Expand Down Expand Up @@ -172,16 +174,15 @@ static int soc_compr_open_fe(struct snd_compr_stream *cstream)
!component->driver->compr_ops->open)
continue;

__ret = component->driver->compr_ops->open(cstream);
if (__ret < 0) {
ret = component->driver->compr_ops->open(cstream);
if (ret < 0) {
dev_err(component->dev,
"Compress ASoC: can't open platform %s: %d\n",
component->name, __ret);
ret = __ret;
component->name, ret);
goto machine_err;
}
}
if (ret < 0)
goto machine_err;
component = NULL;

if (fe->dai_link->compr_ops && fe->dai_link->compr_ops->startup) {
ret = fe->dai_link->compr_ops->startup(cstream);
Expand Down Expand Up @@ -236,17 +237,20 @@ static int soc_compr_open_fe(struct snd_compr_stream *cstream)
fe->dai_link->compr_ops->shutdown(cstream);
machine_err:
for_each_rtdcom(fe, rtdcom) {
component = rtdcom->component;
struct snd_soc_component *err_comp = rtdcom->component;

if (err_comp == component)
break;

/* ignore duplication for now */
if (platform && (component == &platform->component))
if (platform && (err_comp == &platform->component))
continue;

if (!component->driver->compr_ops ||
!component->driver->compr_ops->free)
if (!err_comp->driver->compr_ops ||
!err_comp->driver->compr_ops->free)
continue;

component->driver->compr_ops->free(cstream);
err_comp->driver->compr_ops->free(cstream);
}

if (platform && platform->driver->compr_ops && platform->driver->compr_ops->free)
Expand Down

0 comments on commit 2858e2c

Please sign in to comment.