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

Commit e99a866c authored by Mark Brown's avatar Mark Brown
Browse files

Merge remote-tracking branches 'asoc/topic/tlv320aic3x', 'asoc/topic/width',...

Merge remote-tracking branches 'asoc/topic/tlv320aic3x', 'asoc/topic/width', 'asoc/topic/wm0010', 'asoc/topic/wm8904' and 'asoc/topic/wm8962' into asoc-next
Loading
Loading
Loading
Loading
+33 −0
Original line number Original line Diff line number Diff line
WM8904 audio CODEC

This device supports I2C only.

Required properties:
  - compatible: "wlf,wm8904"
  - reg: the I2C address of the device.
  - clock-names: "mclk"
  - clocks: reference to
    <Documentation/devicetree/bindings/clock/clock-bindings.txt>

Pins on the device (for linking into audio routes):

  * IN1L
  * IN1R
  * IN2L
  * IN2R
  * IN3L
  * IN3R
  * HPOUTL
  * HPOUTR
  * LINEOUTL
  * LINEOUTR
  * MICBIAS

Examples:

codec: wm8904@1a {
	compatible = "wlf,wm8904";
	reg = <0x1a>;
	clocks = <&pck0>;
	clock-names = "mclk";
};
+1 −0
Original line number Original line Diff line number Diff line
@@ -37,6 +37,7 @@
#define WM8962_GPIO_FN_MICSCD          22
#define WM8962_GPIO_FN_MICSCD          22


struct wm8962_pdata {
struct wm8962_pdata {
	struct clk *mclk;
	int gpio_base;
	int gpio_base;
	u32 gpio_init[WM8962_MAX_GPIO];
	u32 gpio_init[WM8962_MAX_GPIO];


+6 −6
Original line number Original line Diff line number Diff line
@@ -945,11 +945,11 @@ static int pm860x_pcm_hw_params(struct snd_pcm_substream *substream,
	unsigned char inf = 0, mask = 0;
	unsigned char inf = 0, mask = 0;


	/* bit size */
	/* bit size */
	switch (params_format(params)) {
	switch (params_width(params)) {
	case SNDRV_PCM_FORMAT_S16_LE:
	case 16:
		inf &= ~PCM_INF2_18WL;
		inf &= ~PCM_INF2_18WL;
		break;
		break;
	case SNDRV_PCM_FORMAT_S18_3LE:
	case 18:
		inf |= PCM_INF2_18WL;
		inf |= PCM_INF2_18WL;
		break;
		break;
	default:
	default:
@@ -1044,11 +1044,11 @@ static int pm860x_i2s_hw_params(struct snd_pcm_substream *substream,
	unsigned char inf;
	unsigned char inf;


	/* bit size */
	/* bit size */
	switch (params_format(params)) {
	switch (params_width(params)) {
	case SNDRV_PCM_FORMAT_S16_LE:
	case 16:
		inf = 0;
		inf = 0;
		break;
		break;
	case SNDRV_PCM_FORMAT_S18_3LE:
	case 18:
		inf = PCM_INF2_18WL;
		inf = PCM_INF2_18WL;
		break;
		break;
	default:
	default:
+4 −4
Original line number Original line Diff line number Diff line
@@ -359,14 +359,14 @@ static int adau17x1_hw_params(struct snd_pcm_substream *substream,
	if (adau->dai_fmt != SND_SOC_DAIFMT_RIGHT_J)
	if (adau->dai_fmt != SND_SOC_DAIFMT_RIGHT_J)
		return 0;
		return 0;


	switch (params_format(params)) {
	switch (params_width(params)) {
	case SNDRV_PCM_FORMAT_S16_LE:
	case 16:
		val = ADAU17X1_SERIAL_PORT1_DELAY16;
		val = ADAU17X1_SERIAL_PORT1_DELAY16;
		break;
		break;
	case SNDRV_PCM_FORMAT_S24_LE:
	case 24:
		val = ADAU17X1_SERIAL_PORT1_DELAY8;
		val = ADAU17X1_SERIAL_PORT1_DELAY8;
		break;
		break;
	case SNDRV_PCM_FORMAT_S32_LE:
	case 32:
		val = ADAU17X1_SERIAL_PORT1_DELAY0;
		val = ADAU17X1_SERIAL_PORT1_DELAY0;
		break;
		break;
	default:
	default:
+3 −3
Original line number Original line Diff line number Diff line
@@ -1299,12 +1299,12 @@ static int max98088_dai2_hw_params(struct snd_pcm_substream *substream,


       rate = params_rate(params);
       rate = params_rate(params);


       switch (params_format(params)) {
       switch (params_width(params)) {
       case SNDRV_PCM_FORMAT_S16_LE:
       case 16:
               snd_soc_update_bits(codec, M98088_REG_1C_DAI2_FORMAT,
               snd_soc_update_bits(codec, M98088_REG_1C_DAI2_FORMAT,
                       M98088_DAI_WS, 0);
                       M98088_DAI_WS, 0);
               break;
               break;
       case SNDRV_PCM_FORMAT_S24_LE:
       case 24:
               snd_soc_update_bits(codec, M98088_REG_1C_DAI2_FORMAT,
               snd_soc_update_bits(codec, M98088_REG_1C_DAI2_FORMAT,
                       M98088_DAI_WS, M98088_DAI_WS);
                       M98088_DAI_WS, M98088_DAI_WS);
               break;
               break;
Loading