Skip to content

Commit

Permalink
Merge remote-tracking branches 'asoc/topic/cs42l56', 'asoc/topic/cs42…
Browse files Browse the repository at this point in the history
…l73', 'asoc/topic/cs4349' and 'asoc/topic/da732x' into asoc-next
  • Loading branch information
Mark Brown committed Aug 30, 2015
5 parents b18fec9 + 7f325bf + fbf917e + f755d11 + a01da00 commit 3999622
Show file tree
Hide file tree
Showing 8 changed files with 563 additions and 151 deletions.
19 changes: 19 additions & 0 deletions Documentation/devicetree/bindings/sound/cs4349.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
CS4349 audio CODEC

Required properties:

- compatible : "cirrus,cs4349"

- reg : the I2C address of the device for I2C

Optional properties:

- reset-gpios : a GPIO spec for the reset pin.

Example:

codec: cs4349@48 {
compatible = "cirrus,cs4349";
reg = <0x48>;
reset-gpios = <&gpio 54 0>;
};
6 changes: 6 additions & 0 deletions sound/soc/codecs/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,7 @@ config SND_SOC_ALL_CODECS
select SND_SOC_CS4271_I2C if I2C
select SND_SOC_CS4271_SPI if SPI_MASTER
select SND_SOC_CS42XX8_I2C if I2C
select SND_SOC_CS4349 if I2C
select SND_SOC_CX20442 if TTY
select SND_SOC_DA7210 if SND_SOC_I2C_AND_SPI
select SND_SOC_DA7213 if I2C
Expand Down Expand Up @@ -404,6 +405,11 @@ config SND_SOC_CS42XX8_I2C
select SND_SOC_CS42XX8
select REGMAP_I2C

# Cirrus Logic CS4349 HiFi DAC
config SND_SOC_CS4349
tristate "Cirrus Logic CS4349 CODEC"
depends on I2C

config SND_SOC_CX20442
tristate
depends on TTY
Expand Down
2 changes: 2 additions & 0 deletions sound/soc/codecs/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,7 @@ snd-soc-cs4271-i2c-objs := cs4271-i2c.o
snd-soc-cs4271-spi-objs := cs4271-spi.o
snd-soc-cs42xx8-objs := cs42xx8.o
snd-soc-cs42xx8-i2c-objs := cs42xx8-i2c.o
snd-soc-cs4349-objs := cs4349.o
snd-soc-cx20442-objs := cx20442.o
snd-soc-da7210-objs := da7210.o
snd-soc-da7213-objs := da7213.o
Expand Down Expand Up @@ -233,6 +234,7 @@ obj-$(CONFIG_SND_SOC_CS4271_I2C) += snd-soc-cs4271-i2c.o
obj-$(CONFIG_SND_SOC_CS4271_SPI) += snd-soc-cs4271-spi.o
obj-$(CONFIG_SND_SOC_CS42XX8) += snd-soc-cs42xx8.o
obj-$(CONFIG_SND_SOC_CS42XX8_I2C) += snd-soc-cs42xx8-i2c.o
obj-$(CONFIG_SND_SOC_CS4349) += snd-soc-cs4349.o
obj-$(CONFIG_SND_SOC_CX20442) += snd-soc-cx20442.o
obj-$(CONFIG_SND_SOC_DA7210) += snd-soc-da7210.o
obj-$(CONFIG_SND_SOC_DA7213) += snd-soc-da7213.o
Expand Down
47 changes: 1 addition & 46 deletions sound/soc/codecs/cs42l56.c
Original file line number Diff line number Diff line change
Expand Up @@ -115,52 +115,7 @@ static const struct reg_default cs42l56_reg_defaults[] = {
static bool cs42l56_readable_register(struct device *dev, unsigned int reg)
{
switch (reg) {
case CS42L56_CHIP_ID_1:
case CS42L56_CHIP_ID_2:
case CS42L56_PWRCTL_1:
case CS42L56_PWRCTL_2:
case CS42L56_CLKCTL_1:
case CS42L56_CLKCTL_2:
case CS42L56_SERIAL_FMT:
case CS42L56_CLASSH_CTL:
case CS42L56_MISC_CTL:
case CS42L56_INT_STATUS:
case CS42L56_PLAYBACK_CTL:
case CS42L56_DSP_MUTE_CTL:
case CS42L56_ADCA_MIX_VOLUME:
case CS42L56_ADCB_MIX_VOLUME:
case CS42L56_PCMA_MIX_VOLUME:
case CS42L56_PCMB_MIX_VOLUME:
case CS42L56_ANAINPUT_ADV_VOLUME:
case CS42L56_DIGINPUT_ADV_VOLUME:
case CS42L56_MASTER_A_VOLUME:
case CS42L56_MASTER_B_VOLUME:
case CS42L56_BEEP_FREQ_ONTIME:
case CS42L56_BEEP_FREQ_OFFTIME:
case CS42L56_BEEP_TONE_CFG:
case CS42L56_TONE_CTL:
case CS42L56_CHAN_MIX_SWAP:
case CS42L56_AIN_REFCFG_ADC_MUX:
case CS42L56_HPF_CTL:
case CS42L56_MISC_ADC_CTL:
case CS42L56_GAIN_BIAS_CTL:
case CS42L56_PGAA_MUX_VOLUME:
case CS42L56_PGAB_MUX_VOLUME:
case CS42L56_ADCA_ATTENUATOR:
case CS42L56_ADCB_ATTENUATOR:
case CS42L56_ALC_EN_ATTACK_RATE:
case CS42L56_ALC_RELEASE_RATE:
case CS42L56_ALC_THRESHOLD:
case CS42L56_NOISE_GATE_CTL:
case CS42L56_ALC_LIM_SFT_ZC:
case CS42L56_AMUTE_HPLO_MUX:
case CS42L56_HPA_VOLUME:
case CS42L56_HPB_VOLUME:
case CS42L56_LOA_VOLUME:
case CS42L56_LOB_VOLUME:
case CS42L56_LIM_THRESHOLD_CTL:
case CS42L56_LIM_CTL_RELEASE_RATE:
case CS42L56_LIM_ATTACK_RATE:
case CS42L56_CHIP_ID_1 ... CS42L56_LIM_ATTACK_RATE:
return true;
default:
return false;
Expand Down
100 changes: 4 additions & 96 deletions sound/soc/codecs/cs42l73.c
Original file line number Diff line number Diff line change
Expand Up @@ -153,100 +153,8 @@ static bool cs42l73_volatile_register(struct device *dev, unsigned int reg)
static bool cs42l73_readable_register(struct device *dev, unsigned int reg)
{
switch (reg) {
case CS42L73_DEVID_AB:
case CS42L73_DEVID_CD:
case CS42L73_DEVID_E:
case CS42L73_REVID:
case CS42L73_PWRCTL1:
case CS42L73_PWRCTL2:
case CS42L73_PWRCTL3:
case CS42L73_CPFCHC:
case CS42L73_OLMBMSDC:
case CS42L73_DMMCC:
case CS42L73_XSPC:
case CS42L73_XSPMMCC:
case CS42L73_ASPC:
case CS42L73_ASPMMCC:
case CS42L73_VSPC:
case CS42L73_VSPMMCC:
case CS42L73_VXSPFS:
case CS42L73_MIOPC:
case CS42L73_ADCIPC:
case CS42L73_MICAPREPGAAVOL:
case CS42L73_MICBPREPGABVOL:
case CS42L73_IPADVOL:
case CS42L73_IPBDVOL:
case CS42L73_PBDC:
case CS42L73_HLADVOL:
case CS42L73_HLBDVOL:
case CS42L73_SPKDVOL:
case CS42L73_ESLDVOL:
case CS42L73_HPAAVOL:
case CS42L73_HPBAVOL:
case CS42L73_LOAAVOL:
case CS42L73_LOBAVOL:
case CS42L73_STRINV:
case CS42L73_XSPINV:
case CS42L73_ASPINV:
case CS42L73_VSPINV:
case CS42L73_LIMARATEHL:
case CS42L73_LIMRRATEHL:
case CS42L73_LMAXHL:
case CS42L73_LIMARATESPK:
case CS42L73_LIMRRATESPK:
case CS42L73_LMAXSPK:
case CS42L73_LIMARATEESL:
case CS42L73_LIMRRATEESL:
case CS42L73_LMAXESL:
case CS42L73_ALCARATE:
case CS42L73_ALCRRATE:
case CS42L73_ALCMINMAX:
case CS42L73_NGCAB:
case CS42L73_ALCNGMC:
case CS42L73_MIXERCTL:
case CS42L73_HLAIPAA:
case CS42L73_HLBIPBA:
case CS42L73_HLAXSPAA:
case CS42L73_HLBXSPBA:
case CS42L73_HLAASPAA:
case CS42L73_HLBASPBA:
case CS42L73_HLAVSPMA:
case CS42L73_HLBVSPMA:
case CS42L73_XSPAIPAA:
case CS42L73_XSPBIPBA:
case CS42L73_XSPAXSPAA:
case CS42L73_XSPBXSPBA:
case CS42L73_XSPAASPAA:
case CS42L73_XSPAASPBA:
case CS42L73_XSPAVSPMA:
case CS42L73_XSPBVSPMA:
case CS42L73_ASPAIPAA:
case CS42L73_ASPBIPBA:
case CS42L73_ASPAXSPAA:
case CS42L73_ASPBXSPBA:
case CS42L73_ASPAASPAA:
case CS42L73_ASPBASPBA:
case CS42L73_ASPAVSPMA:
case CS42L73_ASPBVSPMA:
case CS42L73_VSPAIPAA:
case CS42L73_VSPBIPBA:
case CS42L73_VSPAXSPAA:
case CS42L73_VSPBXSPBA:
case CS42L73_VSPAASPAA:
case CS42L73_VSPBASPBA:
case CS42L73_VSPAVSPMA:
case CS42L73_VSPBVSPMA:
case CS42L73_MMIXCTL:
case CS42L73_SPKMIPMA:
case CS42L73_SPKMXSPA:
case CS42L73_SPKMASPA:
case CS42L73_SPKMVSPMA:
case CS42L73_ESLMIPMA:
case CS42L73_ESLMXSPA:
case CS42L73_ESLMASPA:
case CS42L73_ESLMVSPMA:
case CS42L73_IM1:
case CS42L73_IM2:
case CS42L73_DEVID_AB ... CS42L73_DEVID_E:
case CS42L73_REVID ... CS42L73_IM2:
return true;
default:
return false;
Expand Down Expand Up @@ -1236,8 +1144,8 @@ static int cs42l73_set_tristate(struct snd_soc_dai *dai, int tristate)
struct snd_soc_codec *codec = dai->codec;
int id = dai->id;

return snd_soc_update_bits(codec, CS42L73_SPC(id),
0x7F, tristate << 7);
return snd_soc_update_bits(codec, CS42L73_SPC(id), CS42L73_SP_3ST,
tristate << 7);
}

static const struct snd_pcm_hw_constraint_list constraints_12_24 = {
Expand Down
Loading

0 comments on commit 3999622

Please sign in to comment.