ASoC: Fixes for v3.16
Quite a few build coverage fixes in here among the usual small driver fixes includling the sigmadsp change from Lars - moving the driver to separate modules per bus (which is basically just code motion) avoids issues with some combinations of buses being enabled. -----BEGIN PGP SIGNATURE----- Version: GnuPG v1 iQIcBAABAgAGBQJToCEOAAoJELSic+t+oim9hS8P/jtMAdaR3JO5R1qtg8qj1tO8 ati7DEhkKHn+9rSv4rBtfjqFk0Tdy4r9ulQAS88D9k3WGWpZgUf8wdfMWdL94s5I WRJbvtcss7VGarfOAEreaqd3/PJ0buVLeUm+JNap794WW74BqPlfw6+JveWCAL1V UfRlkQ+PwbU4f7ieXKrtpinOpffFY6hB6N19l+nPqyy0aCn5S/rv4SXUkcJ77slG jOjM1yxg2/RR25LDRqm6uyi2032KwhQZEyP3OccxcRWIROzltqNa+biPJwjdpUlo aVHQ2vICFovOC1WsWSEwjntkLvgYOJGP/50ecC2SqgL6QmvR03isUqSKzkIxigog 2+fMEeXEn7gtjQNpZFDk2Ku9DDbDR22SaRlrjaMOa/YMCc8ylSY1IXuL51IkEfip tSWGOGvg7veYhVQtnxu7wSxtnK/Gb53ugRxFYba1f44bxOKl5KByPfSY22e65e2X hVFqVDbikEszcU7AJxMVKvGb1bPF+RGTmlfL20IXnxs/OtGVx0FURZGKLAMagVXr 3Um0W4HzAipmCBW5NmbQu+gAWoOa17c9rILOc4IaIW5zCvv+V8AURaiwT5sHtUhU JAeNIPIVadO7Lps+bgGT/Auisa8loFiYXFGOJecgcXPiMnZ+2jp7Gb3EgG5Gl8YQ boxQMUoCp3d+I2+uAqpm =oF1h -----END PGP SIGNATURE----- Merge tag 'asoc-v3.16-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound into for-linus ASoC: Fixes for v3.16 Quite a few build coverage fixes in here among the usual small driver fixes includling the sigmadsp change from Lars - moving the driver to separate modules per bus (which is basically just code motion) avoids issues with some combinations of buses being enabled.
This commit is contained in:
commit
6c0c9a3db4
11 changed files with 134 additions and 88 deletions
|
@ -225,11 +225,11 @@ config SND_SOC_ADAU1373
|
||||||
config SND_SOC_ADAU1701
|
config SND_SOC_ADAU1701
|
||||||
tristate "Analog Devices ADAU1701 CODEC"
|
tristate "Analog Devices ADAU1701 CODEC"
|
||||||
depends on I2C
|
depends on I2C
|
||||||
select SND_SOC_SIGMADSP
|
select SND_SOC_SIGMADSP_I2C
|
||||||
|
|
||||||
config SND_SOC_ADAU17X1
|
config SND_SOC_ADAU17X1
|
||||||
tristate
|
tristate
|
||||||
select SND_SOC_SIGMADSP
|
select SND_SOC_SIGMADSP_REGMAP
|
||||||
|
|
||||||
config SND_SOC_ADAU1761
|
config SND_SOC_ADAU1761
|
||||||
tristate
|
tristate
|
||||||
|
@ -476,6 +476,14 @@ config SND_SOC_SIGMADSP
|
||||||
tristate
|
tristate
|
||||||
select CRC32
|
select CRC32
|
||||||
|
|
||||||
|
config SND_SOC_SIGMADSP_I2C
|
||||||
|
tristate
|
||||||
|
select SND_SOC_SIGMADSP
|
||||||
|
|
||||||
|
config SND_SOC_SIGMADSP_REGMAP
|
||||||
|
tristate
|
||||||
|
select SND_SOC_SIGMADSP
|
||||||
|
|
||||||
config SND_SOC_SIRF_AUDIO_CODEC
|
config SND_SOC_SIRF_AUDIO_CODEC
|
||||||
tristate "SiRF SoC internal audio codec"
|
tristate "SiRF SoC internal audio codec"
|
||||||
select REGMAP_MMIO
|
select REGMAP_MMIO
|
||||||
|
|
|
@ -77,6 +77,8 @@ snd-soc-sgtl5000-objs := sgtl5000.o
|
||||||
snd-soc-alc5623-objs := alc5623.o
|
snd-soc-alc5623-objs := alc5623.o
|
||||||
snd-soc-alc5632-objs := alc5632.o
|
snd-soc-alc5632-objs := alc5632.o
|
||||||
snd-soc-sigmadsp-objs := sigmadsp.o
|
snd-soc-sigmadsp-objs := sigmadsp.o
|
||||||
|
snd-soc-sigmadsp-i2c-objs := sigmadsp-i2c.o
|
||||||
|
snd-soc-sigmadsp-regmap-objs := sigmadsp-regmap.o
|
||||||
snd-soc-si476x-objs := si476x.o
|
snd-soc-si476x-objs := si476x.o
|
||||||
snd-soc-sirf-audio-codec-objs := sirf-audio-codec.o
|
snd-soc-sirf-audio-codec-objs := sirf-audio-codec.o
|
||||||
snd-soc-sn95031-objs := sn95031.o
|
snd-soc-sn95031-objs := sn95031.o
|
||||||
|
@ -240,6 +242,8 @@ obj-$(CONFIG_SND_SOC_RT5651) += snd-soc-rt5651.o
|
||||||
obj-$(CONFIG_SND_SOC_RT5677) += snd-soc-rt5677.o
|
obj-$(CONFIG_SND_SOC_RT5677) += snd-soc-rt5677.o
|
||||||
obj-$(CONFIG_SND_SOC_SGTL5000) += snd-soc-sgtl5000.o
|
obj-$(CONFIG_SND_SOC_SGTL5000) += snd-soc-sgtl5000.o
|
||||||
obj-$(CONFIG_SND_SOC_SIGMADSP) += snd-soc-sigmadsp.o
|
obj-$(CONFIG_SND_SOC_SIGMADSP) += snd-soc-sigmadsp.o
|
||||||
|
obj-$(CONFIG_SND_SOC_SIGMADSP_I2C) += snd-soc-sigmadsp-i2c.o
|
||||||
|
obj-$(CONFIG_SND_SOC_SIGMADSP_REGMAP) += snd-soc-sigmadsp-regmap.o
|
||||||
obj-$(CONFIG_SND_SOC_SI476X) += snd-soc-si476x.o
|
obj-$(CONFIG_SND_SOC_SI476X) += snd-soc-si476x.o
|
||||||
obj-$(CONFIG_SND_SOC_SN95031) +=snd-soc-sn95031.o
|
obj-$(CONFIG_SND_SOC_SN95031) +=snd-soc-sn95031.o
|
||||||
obj-$(CONFIG_SND_SOC_SPDIF) += snd-soc-spdif-rx.o snd-soc-spdif-tx.o
|
obj-$(CONFIG_SND_SOC_SPDIF) += snd-soc-spdif-rx.o snd-soc-spdif-tx.o
|
||||||
|
|
35
sound/soc/codecs/sigmadsp-i2c.c
Normal file
35
sound/soc/codecs/sigmadsp-i2c.c
Normal file
|
@ -0,0 +1,35 @@
|
||||||
|
/*
|
||||||
|
* Load Analog Devices SigmaStudio firmware files
|
||||||
|
*
|
||||||
|
* Copyright 2009-2011 Analog Devices Inc.
|
||||||
|
*
|
||||||
|
* Licensed under the GPL-2 or later.
|
||||||
|
*/
|
||||||
|
|
||||||
|
#include <linux/i2c.h>
|
||||||
|
#include <linux/export.h>
|
||||||
|
#include <linux/module.h>
|
||||||
|
|
||||||
|
#include "sigmadsp.h"
|
||||||
|
|
||||||
|
static int sigma_action_write_i2c(void *control_data,
|
||||||
|
const struct sigma_action *sa, size_t len)
|
||||||
|
{
|
||||||
|
return i2c_master_send(control_data, (const unsigned char *)&sa->addr,
|
||||||
|
len);
|
||||||
|
}
|
||||||
|
|
||||||
|
int process_sigma_firmware(struct i2c_client *client, const char *name)
|
||||||
|
{
|
||||||
|
struct sigma_firmware ssfw;
|
||||||
|
|
||||||
|
ssfw.control_data = client;
|
||||||
|
ssfw.write = sigma_action_write_i2c;
|
||||||
|
|
||||||
|
return _process_sigma_firmware(&client->dev, &ssfw, name);
|
||||||
|
}
|
||||||
|
EXPORT_SYMBOL(process_sigma_firmware);
|
||||||
|
|
||||||
|
MODULE_AUTHOR("Lars-Peter Clausen <lars@metafoo.de>");
|
||||||
|
MODULE_DESCRIPTION("SigmaDSP I2C firmware loader");
|
||||||
|
MODULE_LICENSE("GPL");
|
36
sound/soc/codecs/sigmadsp-regmap.c
Normal file
36
sound/soc/codecs/sigmadsp-regmap.c
Normal file
|
@ -0,0 +1,36 @@
|
||||||
|
/*
|
||||||
|
* Load Analog Devices SigmaStudio firmware files
|
||||||
|
*
|
||||||
|
* Copyright 2009-2011 Analog Devices Inc.
|
||||||
|
*
|
||||||
|
* Licensed under the GPL-2 or later.
|
||||||
|
*/
|
||||||
|
|
||||||
|
#include <linux/regmap.h>
|
||||||
|
#include <linux/export.h>
|
||||||
|
#include <linux/module.h>
|
||||||
|
|
||||||
|
#include "sigmadsp.h"
|
||||||
|
|
||||||
|
static int sigma_action_write_regmap(void *control_data,
|
||||||
|
const struct sigma_action *sa, size_t len)
|
||||||
|
{
|
||||||
|
return regmap_raw_write(control_data, be16_to_cpu(sa->addr),
|
||||||
|
sa->payload, len - 2);
|
||||||
|
}
|
||||||
|
|
||||||
|
int process_sigma_firmware_regmap(struct device *dev, struct regmap *regmap,
|
||||||
|
const char *name)
|
||||||
|
{
|
||||||
|
struct sigma_firmware ssfw;
|
||||||
|
|
||||||
|
ssfw.control_data = regmap;
|
||||||
|
ssfw.write = sigma_action_write_regmap;
|
||||||
|
|
||||||
|
return _process_sigma_firmware(dev, &ssfw, name);
|
||||||
|
}
|
||||||
|
EXPORT_SYMBOL(process_sigma_firmware_regmap);
|
||||||
|
|
||||||
|
MODULE_AUTHOR("Lars-Peter Clausen <lars@metafoo.de>");
|
||||||
|
MODULE_DESCRIPTION("SigmaDSP regmap firmware loader");
|
||||||
|
MODULE_LICENSE("GPL");
|
|
@ -34,23 +34,6 @@ enum {
|
||||||
SIGMA_ACTION_END,
|
SIGMA_ACTION_END,
|
||||||
};
|
};
|
||||||
|
|
||||||
struct sigma_action {
|
|
||||||
u8 instr;
|
|
||||||
u8 len_hi;
|
|
||||||
__le16 len;
|
|
||||||
__be16 addr;
|
|
||||||
unsigned char payload[];
|
|
||||||
} __packed;
|
|
||||||
|
|
||||||
struct sigma_firmware {
|
|
||||||
const struct firmware *fw;
|
|
||||||
size_t pos;
|
|
||||||
|
|
||||||
void *control_data;
|
|
||||||
int (*write)(void *control_data, const struct sigma_action *sa,
|
|
||||||
size_t len);
|
|
||||||
};
|
|
||||||
|
|
||||||
static inline u32 sigma_action_len(struct sigma_action *sa)
|
static inline u32 sigma_action_len(struct sigma_action *sa)
|
||||||
{
|
{
|
||||||
return (sa->len_hi << 16) | le16_to_cpu(sa->len);
|
return (sa->len_hi << 16) | le16_to_cpu(sa->len);
|
||||||
|
@ -138,7 +121,7 @@ process_sigma_actions(struct sigma_firmware *ssfw)
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
static int _process_sigma_firmware(struct device *dev,
|
int _process_sigma_firmware(struct device *dev,
|
||||||
struct sigma_firmware *ssfw, const char *name)
|
struct sigma_firmware *ssfw, const char *name)
|
||||||
{
|
{
|
||||||
int ret;
|
int ret;
|
||||||
|
@ -197,50 +180,6 @@ static int _process_sigma_firmware(struct device *dev,
|
||||||
|
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
EXPORT_SYMBOL_GPL(_process_sigma_firmware);
|
||||||
#if IS_ENABLED(CONFIG_I2C)
|
|
||||||
|
|
||||||
static int sigma_action_write_i2c(void *control_data,
|
|
||||||
const struct sigma_action *sa, size_t len)
|
|
||||||
{
|
|
||||||
return i2c_master_send(control_data, (const unsigned char *)&sa->addr,
|
|
||||||
len);
|
|
||||||
}
|
|
||||||
|
|
||||||
int process_sigma_firmware(struct i2c_client *client, const char *name)
|
|
||||||
{
|
|
||||||
struct sigma_firmware ssfw;
|
|
||||||
|
|
||||||
ssfw.control_data = client;
|
|
||||||
ssfw.write = sigma_action_write_i2c;
|
|
||||||
|
|
||||||
return _process_sigma_firmware(&client->dev, &ssfw, name);
|
|
||||||
}
|
|
||||||
EXPORT_SYMBOL(process_sigma_firmware);
|
|
||||||
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#if IS_ENABLED(CONFIG_REGMAP)
|
|
||||||
|
|
||||||
static int sigma_action_write_regmap(void *control_data,
|
|
||||||
const struct sigma_action *sa, size_t len)
|
|
||||||
{
|
|
||||||
return regmap_raw_write(control_data, be16_to_cpu(sa->addr),
|
|
||||||
sa->payload, len - 2);
|
|
||||||
}
|
|
||||||
|
|
||||||
int process_sigma_firmware_regmap(struct device *dev, struct regmap *regmap,
|
|
||||||
const char *name)
|
|
||||||
{
|
|
||||||
struct sigma_firmware ssfw;
|
|
||||||
|
|
||||||
ssfw.control_data = regmap;
|
|
||||||
ssfw.write = sigma_action_write_regmap;
|
|
||||||
|
|
||||||
return _process_sigma_firmware(dev, &ssfw, name);
|
|
||||||
}
|
|
||||||
EXPORT_SYMBOL(process_sigma_firmware_regmap);
|
|
||||||
|
|
||||||
#endif
|
|
||||||
|
|
||||||
MODULE_LICENSE("GPL");
|
MODULE_LICENSE("GPL");
|
||||||
|
|
|
@ -12,6 +12,26 @@
|
||||||
#include <linux/device.h>
|
#include <linux/device.h>
|
||||||
#include <linux/regmap.h>
|
#include <linux/regmap.h>
|
||||||
|
|
||||||
|
struct sigma_action {
|
||||||
|
u8 instr;
|
||||||
|
u8 len_hi;
|
||||||
|
__le16 len;
|
||||||
|
__be16 addr;
|
||||||
|
unsigned char payload[];
|
||||||
|
} __packed;
|
||||||
|
|
||||||
|
struct sigma_firmware {
|
||||||
|
const struct firmware *fw;
|
||||||
|
size_t pos;
|
||||||
|
|
||||||
|
void *control_data;
|
||||||
|
int (*write)(void *control_data, const struct sigma_action *sa,
|
||||||
|
size_t len);
|
||||||
|
};
|
||||||
|
|
||||||
|
int _process_sigma_firmware(struct device *dev,
|
||||||
|
struct sigma_firmware *ssfw, const char *name);
|
||||||
|
|
||||||
struct i2c_client;
|
struct i2c_client;
|
||||||
|
|
||||||
extern int process_sigma_firmware(struct i2c_client *client, const char *name);
|
extern int process_sigma_firmware(struct i2c_client *client, const char *name);
|
||||||
|
|
|
@ -923,8 +923,8 @@ static int fsl_soc_dma_probe(struct platform_device *pdev)
|
||||||
dma->dai.pcm_free = fsl_dma_free_dma_buffers;
|
dma->dai.pcm_free = fsl_dma_free_dma_buffers;
|
||||||
|
|
||||||
/* Store the SSI-specific information that we need */
|
/* Store the SSI-specific information that we need */
|
||||||
dma->ssi_stx_phys = res.start + offsetof(struct ccsr_ssi, stx0);
|
dma->ssi_stx_phys = res.start + CCSR_SSI_STX0;
|
||||||
dma->ssi_srx_phys = res.start + offsetof(struct ccsr_ssi, srx0);
|
dma->ssi_srx_phys = res.start + CCSR_SSI_SRX0;
|
||||||
|
|
||||||
iprop = of_get_property(ssi_np, "fsl,fifo-depth", NULL);
|
iprop = of_get_property(ssi_np, "fsl,fifo-depth", NULL);
|
||||||
if (iprop)
|
if (iprop)
|
||||||
|
|
|
@ -762,7 +762,7 @@ static int fsl_spdif_vbit_get(struct snd_kcontrol *kcontrol,
|
||||||
struct regmap *regmap = spdif_priv->regmap;
|
struct regmap *regmap = spdif_priv->regmap;
|
||||||
u32 val;
|
u32 val;
|
||||||
|
|
||||||
val = regmap_read(regmap, REG_SPDIF_SIS, &val);
|
regmap_read(regmap, REG_SPDIF_SIS, &val);
|
||||||
ucontrol->value.integer.value[0] = (val & INT_VAL_NOGOOD) != 0;
|
ucontrol->value.integer.value[0] = (val & INT_VAL_NOGOOD) != 0;
|
||||||
regmap_write(regmap, REG_SPDIF_SIC, INT_VAL_NOGOOD);
|
regmap_write(regmap, REG_SPDIF_SIC, INT_VAL_NOGOOD);
|
||||||
|
|
||||||
|
@ -1076,7 +1076,7 @@ static u32 fsl_spdif_txclk_caldiv(struct fsl_spdif_priv *spdif_priv,
|
||||||
goto out;
|
goto out;
|
||||||
} else if (arate / rate[index] == 1) {
|
} else if (arate / rate[index] == 1) {
|
||||||
/* A little bigger than expect */
|
/* A little bigger than expect */
|
||||||
sub = (arate - rate[index]) * 100000;
|
sub = (u64)(arate - rate[index]) * 100000;
|
||||||
do_div(sub, rate[index]);
|
do_div(sub, rate[index]);
|
||||||
if (sub >= savesub)
|
if (sub >= savesub)
|
||||||
continue;
|
continue;
|
||||||
|
@ -1086,7 +1086,7 @@ static u32 fsl_spdif_txclk_caldiv(struct fsl_spdif_priv *spdif_priv,
|
||||||
spdif_priv->txrate[index] = arate;
|
spdif_priv->txrate[index] = arate;
|
||||||
} else if (rate[index] / arate == 1) {
|
} else if (rate[index] / arate == 1) {
|
||||||
/* A little smaller than expect */
|
/* A little smaller than expect */
|
||||||
sub = (rate[index] - arate) * 100000;
|
sub = (u64)(rate[index] - arate) * 100000;
|
||||||
do_div(sub, rate[index]);
|
do_div(sub, rate[index]);
|
||||||
if (sub >= savesub)
|
if (sub >= savesub)
|
||||||
continue;
|
continue;
|
||||||
|
|
|
@ -11,6 +11,7 @@ config SND_PXA2XX_SOC
|
||||||
config SND_MMP_SOC
|
config SND_MMP_SOC
|
||||||
bool "Soc Audio for Marvell MMP chips"
|
bool "Soc Audio for Marvell MMP chips"
|
||||||
depends on ARCH_MMP
|
depends on ARCH_MMP
|
||||||
|
select MMP_SRAM
|
||||||
select SND_SOC_GENERIC_DMAENGINE_PCM
|
select SND_SOC_GENERIC_DMAENGINE_PCM
|
||||||
select SND_ARM
|
select SND_ARM
|
||||||
help
|
help
|
||||||
|
@ -40,7 +41,7 @@ config SND_MMP_SOC_SSPA
|
||||||
|
|
||||||
config SND_PXA2XX_SOC_CORGI
|
config SND_PXA2XX_SOC_CORGI
|
||||||
tristate "SoC Audio support for Sharp Zaurus SL-C7x0"
|
tristate "SoC Audio support for Sharp Zaurus SL-C7x0"
|
||||||
depends on SND_PXA2XX_SOC && PXA_SHARP_C7xx
|
depends on SND_PXA2XX_SOC && PXA_SHARP_C7xx && I2C
|
||||||
select SND_PXA2XX_SOC_I2S
|
select SND_PXA2XX_SOC_I2S
|
||||||
select SND_SOC_WM8731
|
select SND_SOC_WM8731
|
||||||
help
|
help
|
||||||
|
@ -49,7 +50,7 @@ config SND_PXA2XX_SOC_CORGI
|
||||||
|
|
||||||
config SND_PXA2XX_SOC_SPITZ
|
config SND_PXA2XX_SOC_SPITZ
|
||||||
tristate "SoC Audio support for Sharp Zaurus SL-Cxx00"
|
tristate "SoC Audio support for Sharp Zaurus SL-Cxx00"
|
||||||
depends on SND_PXA2XX_SOC && PXA_SHARP_Cxx00
|
depends on SND_PXA2XX_SOC && PXA_SHARP_Cxx00 && I2C
|
||||||
select SND_PXA2XX_SOC_I2S
|
select SND_PXA2XX_SOC_I2S
|
||||||
select SND_SOC_WM8750
|
select SND_SOC_WM8750
|
||||||
help
|
help
|
||||||
|
@ -58,7 +59,7 @@ config SND_PXA2XX_SOC_SPITZ
|
||||||
|
|
||||||
config SND_PXA2XX_SOC_Z2
|
config SND_PXA2XX_SOC_Z2
|
||||||
tristate "SoC Audio support for Zipit Z2"
|
tristate "SoC Audio support for Zipit Z2"
|
||||||
depends on SND_PXA2XX_SOC && MACH_ZIPIT2
|
depends on SND_PXA2XX_SOC && MACH_ZIPIT2 && I2C
|
||||||
select SND_PXA2XX_SOC_I2S
|
select SND_PXA2XX_SOC_I2S
|
||||||
select SND_SOC_WM8750
|
select SND_SOC_WM8750
|
||||||
help
|
help
|
||||||
|
@ -66,7 +67,7 @@ config SND_PXA2XX_SOC_Z2
|
||||||
|
|
||||||
config SND_PXA2XX_SOC_POODLE
|
config SND_PXA2XX_SOC_POODLE
|
||||||
tristate "SoC Audio support for Poodle"
|
tristate "SoC Audio support for Poodle"
|
||||||
depends on SND_PXA2XX_SOC && MACH_POODLE
|
depends on SND_PXA2XX_SOC && MACH_POODLE && I2C
|
||||||
select SND_PXA2XX_SOC_I2S
|
select SND_PXA2XX_SOC_I2S
|
||||||
select SND_SOC_WM8731
|
select SND_SOC_WM8731
|
||||||
help
|
help
|
||||||
|
@ -181,7 +182,7 @@ config SND_PXA2XX_SOC_HX4700
|
||||||
|
|
||||||
config SND_PXA2XX_SOC_MAGICIAN
|
config SND_PXA2XX_SOC_MAGICIAN
|
||||||
tristate "SoC Audio support for HTC Magician"
|
tristate "SoC Audio support for HTC Magician"
|
||||||
depends on SND_PXA2XX_SOC && MACH_MAGICIAN
|
depends on SND_PXA2XX_SOC && MACH_MAGICIAN && I2C
|
||||||
select SND_PXA2XX_SOC_I2S
|
select SND_PXA2XX_SOC_I2S
|
||||||
select SND_PXA_SOC_SSP
|
select SND_PXA_SOC_SSP
|
||||||
select SND_SOC_UDA1380
|
select SND_SOC_UDA1380
|
||||||
|
|
|
@ -315,7 +315,7 @@ static void rsnd_dma_of_name(struct rsnd_dma *dma,
|
||||||
dst_mod = mod[index];
|
dst_mod = mod[index];
|
||||||
} else {
|
} else {
|
||||||
src_mod = mod[index];
|
src_mod = mod[index];
|
||||||
dst_mod = mod[index + 1];
|
dst_mod = mod[index - 1];
|
||||||
}
|
}
|
||||||
|
|
||||||
index = 0;
|
index = 0;
|
||||||
|
|
|
@ -2755,7 +2755,7 @@ int snd_soc_dapm_put_volsw(struct snd_kcontrol *kcontrol,
|
||||||
unsigned int mask = (1 << fls(max)) - 1;
|
unsigned int mask = (1 << fls(max)) - 1;
|
||||||
unsigned int invert = mc->invert;
|
unsigned int invert = mc->invert;
|
||||||
unsigned int val;
|
unsigned int val;
|
||||||
int connect, change;
|
int connect, change, reg_change = 0;
|
||||||
struct snd_soc_dapm_update update;
|
struct snd_soc_dapm_update update;
|
||||||
int ret = 0;
|
int ret = 0;
|
||||||
|
|
||||||
|
@ -2773,20 +2773,23 @@ int snd_soc_dapm_put_volsw(struct snd_kcontrol *kcontrol,
|
||||||
mutex_lock_nested(&card->dapm_mutex, SND_SOC_DAPM_CLASS_RUNTIME);
|
mutex_lock_nested(&card->dapm_mutex, SND_SOC_DAPM_CLASS_RUNTIME);
|
||||||
|
|
||||||
change = dapm_kcontrol_set_value(kcontrol, val);
|
change = dapm_kcontrol_set_value(kcontrol, val);
|
||||||
if (change) {
|
|
||||||
if (reg != SND_SOC_NOPM) {
|
|
||||||
mask = mask << shift;
|
|
||||||
val = val << shift;
|
|
||||||
|
|
||||||
if (snd_soc_test_bits(codec, reg, mask, val)) {
|
if (reg != SND_SOC_NOPM) {
|
||||||
update.kcontrol = kcontrol;
|
mask = mask << shift;
|
||||||
update.reg = reg;
|
val = val << shift;
|
||||||
update.mask = mask;
|
|
||||||
update.val = val;
|
|
||||||
card->update = &update;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
reg_change = snd_soc_test_bits(codec, reg, mask, val);
|
||||||
|
}
|
||||||
|
|
||||||
|
if (change || reg_change) {
|
||||||
|
if (reg_change) {
|
||||||
|
update.kcontrol = kcontrol;
|
||||||
|
update.reg = reg;
|
||||||
|
update.mask = mask;
|
||||||
|
update.val = val;
|
||||||
|
card->update = &update;
|
||||||
}
|
}
|
||||||
|
change |= reg_change;
|
||||||
|
|
||||||
ret = soc_dapm_mixer_update_power(card, kcontrol, connect);
|
ret = soc_dapm_mixer_update_power(card, kcontrol, connect);
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue