Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 0c5dacf2 authored by Mark Brown's avatar Mark Brown
Browse files

Merge remote-tracking branches 'asoc/topic/cs42l56', 'asoc/topic/cs42xx8' and...

Merge remote-tracking branches 'asoc/topic/cs42l56', 'asoc/topic/cs42xx8' and 'asoc/topic/davinci' into asoc-next
Loading
Loading
Loading
Loading
+63 −0
Original line number Diff line number Diff line
CS42L52 audio CODEC

Required properties:

  - compatible : "cirrus,cs42l56"

  - reg : the I2C address of the device for I2C

  - VA-supply, VCP-supply, VLDO-supply : power supplies for the device,
  as covered in Documentation/devicetree/bindings/regulator/regulator.txt.

Optional properties:

  - cirrus,gpio-nreset : GPIO controller's phandle and the number
  of the GPIO used to reset the codec.

  - cirrus,chgfreq-divisor : Values used to set the Charge Pump Frequency.
  Allowable values of 0x00 through 0x0F. These are raw values written to the
  register, not the actual frequency. The frequency is determined by the following.
  Frequency = MCLK / 4 * (N+2)
  N = chgfreq_val
  MCLK = Where MCLK is the frequency of the mclk signal after the MCLKDIV2 circuit.

  - cirrus,ain1a-ref-cfg, ain1b-ref-cfg : boolean, If present, AIN1A or AIN1B are configured
  as a pseudo-differential input referenced to AIN1REF/AIN3A.

  - cirrus,ain2a-ref-cfg, ain2b-ref-cfg : boolean, If present, AIN2A or AIN2B are configured
  as a pseudo-differential input referenced to AIN2REF/AIN3B.

  - cirrus,micbias-lvl: Set the output voltage level on the MICBIAS Pin.
  0 = 0.5 x VA
  1 = 0.6 x VA
  2 = 0.7 x VA
  3 = 0.8 x VA
  4 = 0.83 x VA
  5 = 0.91 x VA

  - cirrus,adaptive-pwr-cfg : Configures how the power to the Headphone and Lineout
  Amplifiers adapt to the output signal levels.
  0 = Adapt to Volume Mode. Voltage level determined by the sum of the relevant volume settings.
  1 = Fixed - Headphone and Line Amp supply = + or - VCP/2.
  2 = Fixed - Headphone and Line Amp supply = + or - VCP.
  3 = Adapted to Signal; Voltage level is dynamically determined by the output signal.

  - cirrus,hpf-left-freq, hpf-right-freq : Sets the corner frequency (-3dB point) for the internal High-Pass
  Filter.
  0 = 1.8Hz
  1 = 119Hz
  2 = 236Hz
  3 = 464Hz


Example:

codec: codec@4b {
	compatible = "cirrus,cs42l56";
	reg = <0x4b>;
	gpio-reset = <&gpio 10 0>;
	cirrus,chgfreq-divisor = <0x05>;
	cirrus.ain1_ref_cfg;
	cirrus,micbias-lvl = <5>;
	VA-supply = <&reg_audio>;
};
+48 −0
Original line number Diff line number Diff line
/*
 * linux/sound/cs42l56.h -- Platform data for CS42L56
 *
 * Copyright (c) 2014 Cirrus Logic Inc.
 *
 * This program is free software; you can redistribute it and/or modify
 * it under the terms of the GNU General Public License version 2 as
 * published by the Free Software Foundation.
 */

#ifndef __CS42L56_H
#define __CS42L56_H

struct cs42l56_platform_data {

	/* GPIO for Reset */
	unsigned int gpio_nreset;

	/* MICBIAS Level. Check datasheet Pg48 */
	unsigned int micbias_lvl;

	/* Analog Input 1A Reference 0=Single 1=Pseudo-Differential */
	unsigned int ain1a_ref_cfg;

	/* Analog Input 2A Reference 0=Single 1=Pseudo-Differential */
	unsigned int ain2a_ref_cfg;

	/* Analog Input 1B Reference 0=Single 1=Pseudo-Differential */
	unsigned int ain1b_ref_cfg;

	/* Analog Input 2B Reference 0=Single 1=Pseudo-Differential */
	unsigned int ain2b_ref_cfg;

	/* Charge Pump Freq. Check datasheet Pg62 */
	unsigned int chgfreq;

	/* HighPass Filter Right Channel Corner Frequency */
	unsigned int hpfb_freq;

	/* HighPass Filter Left Channel Corner Frequency */
	unsigned int hpfa_freq;

	/* Adaptive Power Control for LO/HP */
	unsigned int adaptive_pwr;

};

#endif /* __CS42L56_H */
+2 −0
Original line number Diff line number Diff line
@@ -382,6 +382,8 @@ int snd_soc_resume(struct device *dev);
int snd_soc_poweroff(struct device *dev);
int snd_soc_register_platform(struct device *dev,
		const struct snd_soc_platform_driver *platform_drv);
int devm_snd_soc_register_platform(struct device *dev,
		const struct snd_soc_platform_driver *platform_drv);
void snd_soc_unregister_platform(struct device *dev);
int snd_soc_add_platform(struct device *dev, struct snd_soc_platform *platform,
		const struct snd_soc_platform_driver *platform_drv);
+14 −5
Original line number Diff line number Diff line
@@ -39,8 +39,9 @@ config SND_SOC_ALL_CODECS
	select SND_SOC_ALC5623 if I2C
	select SND_SOC_ALC5632 if I2C
	select SND_SOC_CQ0093VC if MFD_DAVINCI_VOICECODEC
	select SND_SOC_CS42L51 if I2C
	select SND_SOC_CS42L52 if I2C
	select SND_SOC_CS42L51_I2C if I2C
	select SND_SOC_CS42L52 if I2C && INPUT
	select SND_SOC_CS42L56 if I2C && INPUT
	select SND_SOC_CS42L73 if I2C
	select SND_SOC_CS4270 if I2C
	select SND_SOC_CS4271 if SND_SOC_I2C_AND_SPI
@@ -128,7 +129,7 @@ config SND_SOC_ALL_CODECS
	select SND_SOC_WM8955 if I2C
	select SND_SOC_WM8960 if I2C
	select SND_SOC_WM8961 if I2C
	select SND_SOC_WM8962 if I2C
	select SND_SOC_WM8962 if I2C && INPUT
	select SND_SOC_WM8971 if I2C
	select SND_SOC_WM8974 if I2C
	select SND_SOC_WM8978 if I2C
@@ -281,9 +282,17 @@ config SND_SOC_CQ0093VC
config SND_SOC_CS42L51
	tristate

config SND_SOC_CS42L51_I2C
	tristate
	select SND_SOC_CS42L51

config SND_SOC_CS42L52
	tristate "Cirrus Logic CS42L52 CODEC"
	depends on I2C
	depends on I2C && INPUT

config SND_SOC_CS42L56
	tristate "Cirrus Logic CS42L56 CODEC"
	depends on I2C && INPUT

config SND_SOC_CS42L73
	tristate "Cirrus Logic CS42L73 CODEC"
@@ -603,7 +612,7 @@ config SND_SOC_WM8961

config SND_SOC_WM8962
	tristate "Wolfson Microelectronics WM8962 CODEC"
	depends on I2C
	depends on I2C && INPUT

config SND_SOC_WM8971
	tristate
+4 −0
Original line number Diff line number Diff line
@@ -26,7 +26,9 @@ snd-soc-ak5386-objs := ak5386.o
snd-soc-arizona-objs := arizona.o
snd-soc-cq93vc-objs := cq93vc.o
snd-soc-cs42l51-objs := cs42l51.o
snd-soc-cs42l51-i2c-objs := cs42l51-i2c.o
snd-soc-cs42l52-objs := cs42l52.o
snd-soc-cs42l56-objs := cs42l56.o
snd-soc-cs42l73-objs := cs42l73.o
snd-soc-cs4270-objs := cs4270.o
snd-soc-cs4271-objs := cs4271.o
@@ -178,7 +180,9 @@ obj-$(CONFIG_SND_SOC_ALC5632) += snd-soc-alc5632.o
obj-$(CONFIG_SND_SOC_ARIZONA)	+= snd-soc-arizona.o
obj-$(CONFIG_SND_SOC_CQ0093VC) += snd-soc-cq93vc.o
obj-$(CONFIG_SND_SOC_CS42L51)	+= snd-soc-cs42l51.o
obj-$(CONFIG_SND_SOC_CS42L51_I2C)	+= snd-soc-cs42l51-i2c.o
obj-$(CONFIG_SND_SOC_CS42L52)	+= snd-soc-cs42l52.o
obj-$(CONFIG_SND_SOC_CS42L56)	+= snd-soc-cs42l56.o
obj-$(CONFIG_SND_SOC_CS42L73)	+= snd-soc-cs42l73.o
obj-$(CONFIG_SND_SOC_CS4270)	+= snd-soc-cs4270.o
obj-$(CONFIG_SND_SOC_CS4271)	+= snd-soc-cs4271.o
Loading