mirror of
https://github.com/torvalds/linux.git
synced 2024-11-14 16:12:02 +00:00
Merge branch 'for-5.7' of https://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound into asoc-5.8
This commit is contained in:
commit
132a0eb032
0
Documentation/devicetree/bindings/sound/rt1308.txt
Executable file → Normal file
0
Documentation/devicetree/bindings/sound/rt1308.txt
Executable file → Normal file
@ -241,14 +241,6 @@ static int acp3x_dma_open(struct snd_soc_component *component,
|
||||
adata->i2ssp_play_stream && !adata->i2ssp_capture_stream)
|
||||
rv_writel(1, adata->acp3x_base + mmACP_EXTERNAL_INTR_ENB);
|
||||
|
||||
if (substream->stream == SNDRV_PCM_STREAM_PLAYBACK) {
|
||||
adata->play_stream = substream;
|
||||
adata->i2ssp_play_stream = substream;
|
||||
} else {
|
||||
adata->capture_stream = substream;
|
||||
adata->i2ssp_capture_stream = substream;
|
||||
}
|
||||
|
||||
i2s_data->acp3x_base = adata->acp3x_base;
|
||||
runtime->private_data = i2s_data;
|
||||
return ret;
|
||||
@ -263,23 +255,42 @@ static int acp3x_dma_hw_params(struct snd_soc_component *component,
|
||||
struct snd_soc_pcm_runtime *prtd;
|
||||
struct snd_soc_card *card;
|
||||
struct acp3x_platform_info *pinfo;
|
||||
struct i2s_dev_data *adata;
|
||||
u64 size;
|
||||
|
||||
prtd = substream->private_data;
|
||||
card = prtd->card;
|
||||
pinfo = snd_soc_card_get_drvdata(card);
|
||||
adata = dev_get_drvdata(component->dev);
|
||||
rtd = substream->runtime->private_data;
|
||||
if (!rtd)
|
||||
return -EINVAL;
|
||||
|
||||
if (pinfo)
|
||||
if (substream->stream == SNDRV_PCM_STREAM_PLAYBACK)
|
||||
if (pinfo) {
|
||||
if (substream->stream == SNDRV_PCM_STREAM_PLAYBACK) {
|
||||
rtd->i2s_instance = pinfo->play_i2s_instance;
|
||||
else
|
||||
switch (rtd->i2s_instance) {
|
||||
case I2S_BT_INSTANCE:
|
||||
adata->play_stream = substream;
|
||||
break;
|
||||
case I2S_SP_INSTANCE:
|
||||
default:
|
||||
adata->i2ssp_play_stream = substream;
|
||||
}
|
||||
} else {
|
||||
rtd->i2s_instance = pinfo->cap_i2s_instance;
|
||||
else
|
||||
switch (rtd->i2s_instance) {
|
||||
case I2S_BT_INSTANCE:
|
||||
adata->capture_stream = substream;
|
||||
break;
|
||||
case I2S_SP_INSTANCE:
|
||||
default:
|
||||
adata->i2ssp_capture_stream = substream;
|
||||
}
|
||||
}
|
||||
} else {
|
||||
pr_err("pinfo failed\n");
|
||||
|
||||
}
|
||||
size = params_buffer_bytes(params);
|
||||
rtd->dma_addr = substream->dma_buffer.addr;
|
||||
rtd->num_pages = (PAGE_ALIGN(size) >> PAGE_SHIFT);
|
||||
|
@ -32,6 +32,12 @@ static const struct reg_default adau7118_reg_defaults[] = {
|
||||
{ ADAU7118_REG_RESET, 0x00 },
|
||||
};
|
||||
|
||||
static bool adau7118_volatile(struct device *dev, unsigned int reg)
|
||||
{
|
||||
return (reg == ADAU7118_REG_RESET);
|
||||
}
|
||||
|
||||
|
||||
static const struct regmap_config adau7118_regmap_config = {
|
||||
.reg_bits = 8,
|
||||
.val_bits = 8,
|
||||
@ -39,6 +45,7 @@ static const struct regmap_config adau7118_regmap_config = {
|
||||
.num_reg_defaults = ARRAY_SIZE(adau7118_reg_defaults),
|
||||
.cache_type = REGCACHE_RBTREE,
|
||||
.max_register = ADAU7118_REG_RESET,
|
||||
.volatile_reg = adau7118_volatile,
|
||||
};
|
||||
|
||||
static int adau7118_probe_i2c(struct i2c_client *i2c,
|
||||
|
@ -220,6 +220,6 @@ static struct i2c_driver max9768_i2c_driver = {
|
||||
};
|
||||
module_i2c_driver(max9768_i2c_driver);
|
||||
|
||||
MODULE_AUTHOR("Wolfram Sang <w.sang@pengutronix.de>");
|
||||
MODULE_AUTHOR("Wolfram Sang <kernel@pengutronix.de>");
|
||||
MODULE_DESCRIPTION("ASoC MAX9768 amplifier driver");
|
||||
MODULE_LICENSE("GPL v2");
|
||||
|
@ -850,8 +850,8 @@ static int max98373_resume(struct device *dev)
|
||||
{
|
||||
struct max98373_priv *max98373 = dev_get_drvdata(dev);
|
||||
|
||||
max98373_reset(max98373, dev);
|
||||
regcache_cache_only(max98373->regmap, false);
|
||||
max98373_reset(max98373, dev);
|
||||
regcache_sync(max98373->regmap);
|
||||
return 0;
|
||||
}
|
||||
|
@ -511,11 +511,11 @@ static const struct snd_soc_dapm_route adcx140_audio_map[] = {
|
||||
static const struct snd_kcontrol_new adcx140_snd_controls[] = {
|
||||
SOC_SINGLE_TLV("Analog CH1 Mic Gain Volume", ADCX140_CH1_CFG1, 2, 42, 0,
|
||||
adc_tlv),
|
||||
SOC_SINGLE_TLV("Analog CH2 Mic Gain Volume", ADCX140_CH1_CFG2, 2, 42, 0,
|
||||
SOC_SINGLE_TLV("Analog CH2 Mic Gain Volume", ADCX140_CH2_CFG1, 2, 42, 0,
|
||||
adc_tlv),
|
||||
SOC_SINGLE_TLV("Analog CH3 Mic Gain Volume", ADCX140_CH1_CFG3, 2, 42, 0,
|
||||
SOC_SINGLE_TLV("Analog CH3 Mic Gain Volume", ADCX140_CH3_CFG1, 2, 42, 0,
|
||||
adc_tlv),
|
||||
SOC_SINGLE_TLV("Analog CH4 Mic Gain Volume", ADCX140_CH1_CFG4, 2, 42, 0,
|
||||
SOC_SINGLE_TLV("Analog CH4 Mic Gain Volume", ADCX140_CH4_CFG1, 2, 42, 0,
|
||||
adc_tlv),
|
||||
|
||||
SOC_SINGLE_TLV("DRE Threshold", ADCX140_DRE_CFG0, 4, 9, 0,
|
||||
|
@ -666,8 +666,8 @@ static bool byt_is_dsp_busy(struct sst_dsp *dsp)
|
||||
{
|
||||
u64 ipcx;
|
||||
|
||||
ipcx = sst_dsp_shim_read_unlocked(dsp, SST_IPCX);
|
||||
return (ipcx & (SST_IPCX_BUSY | SST_IPCX_DONE));
|
||||
ipcx = sst_dsp_shim_read64_unlocked(dsp, SST_IPCX);
|
||||
return (ipcx & (SST_BYT_IPCX_BUSY | SST_BYT_IPCX_DONE));
|
||||
}
|
||||
|
||||
int sst_byt_dsp_init(struct device *dev, struct sst_pdata *pdata)
|
||||
|
@ -256,7 +256,8 @@ static struct snd_soc_dai_link broadwell_rt286_dais[] = {
|
||||
},
|
||||
};
|
||||
|
||||
static int broadwell_suspend(struct snd_soc_card *card){
|
||||
static int broadwell_disable_jack(struct snd_soc_card *card)
|
||||
{
|
||||
struct snd_soc_component *component;
|
||||
|
||||
for_each_card_components(card, component) {
|
||||
@ -267,9 +268,15 @@ static int broadwell_suspend(struct snd_soc_card *card){
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int broadwell_suspend(struct snd_soc_card *card)
|
||||
{
|
||||
return broadwell_disable_jack(card);
|
||||
}
|
||||
|
||||
static int broadwell_resume(struct snd_soc_card *card){
|
||||
struct snd_soc_component *component;
|
||||
|
||||
@ -318,8 +325,16 @@ static int broadwell_audio_probe(struct platform_device *pdev)
|
||||
return devm_snd_soc_register_card(&pdev->dev, &broadwell_rt286);
|
||||
}
|
||||
|
||||
static int broadwell_audio_remove(struct platform_device *pdev)
|
||||
{
|
||||
struct snd_soc_card *card = platform_get_drvdata(pdev);
|
||||
|
||||
return broadwell_disable_jack(card);
|
||||
}
|
||||
|
||||
static struct platform_driver broadwell_audio = {
|
||||
.probe = broadwell_audio_probe,
|
||||
.remove = broadwell_audio_remove,
|
||||
.driver = {
|
||||
.name = "broadwell-audio",
|
||||
},
|
||||
|
@ -10,7 +10,7 @@
|
||||
#include <linux/interrupt.h>
|
||||
#include <linux/module.h>
|
||||
#include <linux/platform_device.h>
|
||||
#include <linux/io.h>
|
||||
#include <linux/io-64-nonatomic-lo-hi.h>
|
||||
#include <linux/delay.h>
|
||||
|
||||
#include "sst-dsp.h"
|
||||
@ -34,16 +34,13 @@ EXPORT_SYMBOL_GPL(sst_shim32_read);
|
||||
|
||||
void sst_shim32_write64(void __iomem *addr, u32 offset, u64 value)
|
||||
{
|
||||
memcpy_toio(addr + offset, &value, sizeof(value));
|
||||
writeq(value, addr + offset);
|
||||
}
|
||||
EXPORT_SYMBOL_GPL(sst_shim32_write64);
|
||||
|
||||
u64 sst_shim32_read64(void __iomem *addr, u32 offset)
|
||||
{
|
||||
u64 val;
|
||||
|
||||
memcpy_fromio(&val, addr + offset, sizeof(val));
|
||||
return val;
|
||||
return readq(addr + offset);
|
||||
}
|
||||
EXPORT_SYMBOL_GPL(sst_shim32_read64);
|
||||
|
||||
|
@ -1186,10 +1186,9 @@ static int mt8183_afe_pcm_dev_probe(struct platform_device *pdev)
|
||||
|
||||
/* request irq */
|
||||
irq_id = platform_get_irq(pdev, 0);
|
||||
if (!irq_id) {
|
||||
dev_err(dev, "%pOFn no irq found\n", dev->of_node);
|
||||
return -ENXIO;
|
||||
}
|
||||
if (irq_id < 0)
|
||||
return irq_id;
|
||||
|
||||
ret = devm_request_irq(dev, irq_id, mt8183_afe_irq_handler,
|
||||
IRQF_TRIGGER_NONE, "asys-isr", (void *)afe);
|
||||
if (ret) {
|
||||
|
@ -275,9 +275,6 @@ static int mmp_sspa_hw_params(struct snd_pcm_substream *substream,
|
||||
case SNDRV_PCM_FORMAT_S16_LE:
|
||||
sspa_ctrl |= SSPA_CTL_XSSZ1(SSPA_CTL_16_BITS);
|
||||
break;
|
||||
case SNDRV_PCM_FORMAT_S20_3LE:
|
||||
sspa_ctrl |= SSPA_CTL_XSSZ1(SSPA_CTL_20_BITS);
|
||||
break;
|
||||
case SNDRV_PCM_FORMAT_S24_3LE:
|
||||
sspa_ctrl |= SSPA_CTL_XSSZ1(SSPA_CTL_24_BITS);
|
||||
break;
|
||||
@ -362,7 +359,7 @@ static int mmp_sspa_probe(struct snd_soc_dai *dai)
|
||||
#define MMP_SSPA_RATES SNDRV_PCM_RATE_8000_192000
|
||||
#define MMP_SSPA_FORMATS (SNDRV_PCM_FMTBIT_S8 | \
|
||||
SNDRV_PCM_FMTBIT_S16_LE | \
|
||||
SNDRV_PCM_FMTBIT_S24_LE | \
|
||||
SNDRV_PCM_FMTBIT_S24_3LE | \
|
||||
SNDRV_PCM_FMTBIT_S32_LE)
|
||||
|
||||
static const struct snd_soc_dai_ops mmp_sspa_dai_ops = {
|
||||
|
@ -19,8 +19,8 @@ static void update_mute_led(struct snd_sof_control *scontrol,
|
||||
struct snd_kcontrol *kcontrol,
|
||||
struct snd_ctl_elem_value *ucontrol)
|
||||
{
|
||||
unsigned int temp = 0;
|
||||
unsigned int mask;
|
||||
int temp = 0;
|
||||
int mask;
|
||||
int i;
|
||||
|
||||
mask = 1U << snd_ctl_get_ioffidx(kcontrol, &ucontrol->id);
|
||||
|
@ -56,7 +56,7 @@ struct snd_sof_pcm {
|
||||
struct snd_sof_led_control {
|
||||
unsigned int use_led;
|
||||
unsigned int direction;
|
||||
unsigned int led_value;
|
||||
int led_value;
|
||||
};
|
||||
|
||||
/* ALSA SOF Kcontrol device */
|
||||
|
@ -1244,6 +1244,8 @@ static int sof_control_load(struct snd_soc_component *scomp, int index,
|
||||
return ret;
|
||||
}
|
||||
|
||||
scontrol->led_ctl.led_value = -1;
|
||||
|
||||
dobj->private = scontrol;
|
||||
list_add(&scontrol->list, &sdev->kcontrol_list);
|
||||
return ret;
|
||||
|
@ -1896,8 +1896,10 @@ static int davinci_mcasp_get_dma_type(struct davinci_mcasp *mcasp)
|
||||
PTR_ERR(chan));
|
||||
return PTR_ERR(chan);
|
||||
}
|
||||
if (WARN_ON(!chan->device || !chan->device->dev))
|
||||
if (WARN_ON(!chan->device || !chan->device->dev)) {
|
||||
dma_release_channel(chan);
|
||||
return -EINVAL;
|
||||
}
|
||||
|
||||
if (chan->device->dev->of_node)
|
||||
ret = of_property_read_string(chan->device->dev->of_node,
|
||||
|
Loading…
Reference in New Issue
Block a user