mirror of
https://github.com/edk2-porting/linux-next.git
synced 2024-12-24 05:04:00 +08:00
Merge branch 'asoc-4.17' into asoc-linus
This commit is contained in:
commit
2858e2cfc2
3
.mailmap
3
.mailmap
@ -186,6 +186,9 @@ Uwe Kleine-König <ukleinek@informatik.uni-freiburg.de>
|
||||
Uwe Kleine-König <ukl@pengutronix.de>
|
||||
Uwe Kleine-König <Uwe.Kleine-Koenig@digi.com>
|
||||
Valdis Kletnieks <Valdis.Kletnieks@vt.edu>
|
||||
Vinod Koul <vkoul@kernel.org> <vinod.koul@intel.com>
|
||||
Vinod Koul <vkoul@kernel.org> <vinod.koul@linux.intel.com>
|
||||
Vinod Koul <vkoul@kernel.org> <vkoul@infradead.org>
|
||||
Viresh Kumar <vireshk@kernel.org> <viresh.kumar@st.com>
|
||||
Viresh Kumar <vireshk@kernel.org> <viresh.linux@gmail.com>
|
||||
Viresh Kumar <vireshk@kernel.org> <viresh.kumar2@arm.com>
|
||||
|
11
MAINTAINERS
11
MAINTAINERS
@ -7034,14 +7034,13 @@ L: linux-fbdev@vger.kernel.org
|
||||
S: Maintained
|
||||
F: drivers/video/fbdev/i810/
|
||||
|
||||
INTEL ASoC BDW/HSW DRIVERS
|
||||
INTEL ASoC DRIVERS
|
||||
M: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
|
||||
M: Liam Girdwood <liam.r.girdwood@linux.intel.com>
|
||||
M: Jie Yang <yang.jie@linux.intel.com>
|
||||
L: alsa-devel@alsa-project.org (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 <intel-linux-scu@intel.com>
|
||||
@ -13105,7 +13104,7 @@ F: include/uapi/sound/
|
||||
F: sound/
|
||||
|
||||
SOUND - COMPRESSED AUDIO
|
||||
M: Vinod Koul <vinod.koul@intel.com>
|
||||
M: Vinod Koul <vkoul@kernel.org>
|
||||
L: alsa-devel@alsa-project.org (moderated for non-subscribers)
|
||||
T: git git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound.git
|
||||
S: Supported
|
||||
|
@ -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;
|
||||
|
@ -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,
|
||||
};
|
||||
|
@ -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 */
|
||||
@ -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:
|
||||
@ -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;
|
||||
}
|
||||
|
||||
|
@ -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,
|
||||
};
|
||||
|
@ -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)
|
||||
|
@ -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
|
||||
|
@ -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)
|
||||
|
@ -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"};
|
||||
@ -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,
|
||||
|
@ -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);
|
||||
|
||||
@ -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);
|
||||
@ -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)
|
||||
@ -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;
|
||||
@ -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);
|
||||
@ -236,17 +237,20 @@ fe_err:
|
||||
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)
|
||||
|
Loading…
Reference in New Issue
Block a user