Commit cc962479 authored by Mark Brown's avatar Mark Brown

Merge remote-tracking branches 'asoc/topic/compress', 'asoc/topic/const' and...

Merge remote-tracking branches 'asoc/topic/compress', 'asoc/topic/const' and 'asoc/topic/cs35l34' into asoc-next
CS35L34 Speaker Amplifier
Required properties:
- compatible : "cirrus,cs35l34"
- reg : the I2C address of the device for I2C.
- VA-supply, VP-supply : power supplies for the device,
as covered in
Documentation/devicetree/bindings/regulator/regulator.txt.
- cirrus,boost-vtge-millivolt : Boost Voltage Value. Configures the boost
converter's output voltage in mV. The range is from VP to 8V with
increments of 100mV.
- cirrus,boost-nanohenry: Inductor value for boost converter. The value is
in nH and they can be values of 1000nH, 1100nH, 1200nH, 1500nH, and 2200nH.
Optional properties:
- reset-gpios: GPIO used to reset the amplifier.
- interrupt-parent : Specifies the phandle of the interrupt controller to
which the IRQs from CS35L34 are delivered to.
- interrupts : IRQ line info CS35L34.
(See Documentation/devicetree/bindings/interrupt-controller/interrupts.txt
for further information relating to interrupt properties)
- cirrus,boost-peak-milliamp : Boost converter peak current limit in mA. The
range starts at 1200mA and goes to a maximum of 3840mA with increments of
80mA. The default value is 2480mA.
- cirrus,i2s-sdinloc : ADSP SDIN I2S channel location. Indicates whether the
received mono data is in the left or right portion of the I2S frame
according to the AD0 pin or directly via this configuration.
0x0 (Default) = Selected by AD0 input (if AD0 = LOW, use left channel),
0x2 = Left,
0x1 = Selected by the inversion of the AD0 input (if AD0 = LOW, use right
channel),
0x3 = Right.
- cirrus,gain-zc-disable: Boolean property. If set, the gain change will take
effect without waiting for a zero cross.
- cirrus,tdm-rising-edge: Boolean property. If set, data is on the rising edge of
SCLK. Otherwise, data is on the falling edge of SCLK.
Example:
cs35l34: cs35l34@40 {
compatible = "cirrus,cs35l34";
reg = <0x40>;
interrupt-parent = <&gpio8>;
interrupts = <3 IRQ_TYPE_LEVEL_LOW>;
reset-gpios = <&gpio 10 0>;
cirrus,boost-vtge-milltvolt = <8000>; /* 8V */
cirrus,boost-ind-nanohenry = <1000>; /* 1uH */
cirrus,boost-peak-milliamp = <3000>; /* 3A */
};
/*
* linux/sound/cs35l34.h -- Platform data for CS35l34
*
* Copyright (c) 2016 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 __CS35L34_H
#define __CS35L34_H
struct cs35l34_platform_data {
/* Set AIF to half drive strength */
bool aif_half_drv;
/* Digital Soft Ramp Disable */
bool digsft_disable;
/* Amplifier Invert */
bool amp_inv;
/* Peak current (mA) */
unsigned int boost_peak;
/* Boost inductor value (nH) */
unsigned int boost_ind;
/* Boost Controller Voltage Setting (mV) */
unsigned int boost_vtge;
/* Gain Change Zero Cross */
bool gain_zc_disable;
/* SDIN Left/Right Selection */
unsigned int i2s_sdinloc;
/* TDM Rising Edge */
bool tdm_rising_edge;
};
#endif /* __CS35L34_H */
...@@ -207,6 +207,30 @@ struct snd_soc_dai_ops { ...@@ -207,6 +207,30 @@ struct snd_soc_dai_ops {
struct snd_soc_dai *); struct snd_soc_dai *);
}; };
struct snd_soc_cdai_ops {
/*
* for compress ops
*/
int (*startup)(struct snd_compr_stream *,
struct snd_soc_dai *);
int (*shutdown)(struct snd_compr_stream *,
struct snd_soc_dai *);
int (*set_params)(struct snd_compr_stream *,
struct snd_compr_params *, struct snd_soc_dai *);
int (*get_params)(struct snd_compr_stream *,
struct snd_codec *, struct snd_soc_dai *);
int (*set_metadata)(struct snd_compr_stream *,
struct snd_compr_metadata *, struct snd_soc_dai *);
int (*get_metadata)(struct snd_compr_stream *,
struct snd_compr_metadata *, struct snd_soc_dai *);
int (*trigger)(struct snd_compr_stream *, int,
struct snd_soc_dai *);
int (*pointer)(struct snd_compr_stream *,
struct snd_compr_tstamp *, struct snd_soc_dai *);
int (*ack)(struct snd_compr_stream *, size_t,
struct snd_soc_dai *);
};
/* /*
* Digital Audio Interface Driver. * Digital Audio Interface Driver.
* *
...@@ -236,6 +260,7 @@ struct snd_soc_dai_driver { ...@@ -236,6 +260,7 @@ struct snd_soc_dai_driver {
/* ops */ /* ops */
const struct snd_soc_dai_ops *ops; const struct snd_soc_dai_ops *ops;
const struct snd_soc_cdai_ops *cops;
/* DAI capabilities */ /* DAI capabilities */
struct snd_soc_pcm_stream capture; struct snd_soc_pcm_stream capture;
......
...@@ -48,6 +48,7 @@ config SND_SOC_ALL_CODECS ...@@ -48,6 +48,7 @@ config SND_SOC_ALL_CODECS
select SND_SOC_CQ0093VC if MFD_DAVINCI_VOICECODEC select SND_SOC_CQ0093VC if MFD_DAVINCI_VOICECODEC
select SND_SOC_CS35L32 if I2C select SND_SOC_CS35L32 if I2C
select SND_SOC_CS35L33 if I2C select SND_SOC_CS35L33 if I2C
select SND_SOC_CS35L34 if I2C
select SND_SOC_CS42L51_I2C if I2C select SND_SOC_CS42L51_I2C if I2C
select SND_SOC_CS42L52 if I2C && INPUT select SND_SOC_CS42L52 if I2C && INPUT
select SND_SOC_CS42L56 if I2C && INPUT select SND_SOC_CS42L56 if I2C && INPUT
...@@ -399,6 +400,10 @@ config SND_SOC_CS35L33 ...@@ -399,6 +400,10 @@ config SND_SOC_CS35L33
tristate "Cirrus Logic CS35L33 CODEC" tristate "Cirrus Logic CS35L33 CODEC"
depends on I2C depends on I2C
config SND_SOC_CS35L34
tristate "Cirrus Logic CS35L34 CODEC"
depends on I2C
config SND_SOC_CS42L51 config SND_SOC_CS42L51
tristate tristate
......
...@@ -38,6 +38,7 @@ snd-soc-bt-sco-objs := bt-sco.o ...@@ -38,6 +38,7 @@ snd-soc-bt-sco-objs := bt-sco.o
snd-soc-cq93vc-objs := cq93vc.o snd-soc-cq93vc-objs := cq93vc.o
snd-soc-cs35l32-objs := cs35l32.o snd-soc-cs35l32-objs := cs35l32.o
snd-soc-cs35l33-objs := cs35l33.o snd-soc-cs35l33-objs := cs35l33.o
snd-soc-cs35l34-objs := cs35l34.o
snd-soc-cs42l51-objs := cs42l51.o snd-soc-cs42l51-objs := cs42l51.o
snd-soc-cs42l51-i2c-objs := cs42l51-i2c.o snd-soc-cs42l51-i2c-objs := cs42l51-i2c.o
snd-soc-cs42l52-objs := cs42l52.o snd-soc-cs42l52-objs := cs42l52.o
...@@ -263,6 +264,7 @@ obj-$(CONFIG_SND_SOC_BT_SCO) += snd-soc-bt-sco.o ...@@ -263,6 +264,7 @@ obj-$(CONFIG_SND_SOC_BT_SCO) += snd-soc-bt-sco.o
obj-$(CONFIG_SND_SOC_CQ0093VC) += snd-soc-cq93vc.o obj-$(CONFIG_SND_SOC_CQ0093VC) += snd-soc-cq93vc.o
obj-$(CONFIG_SND_SOC_CS35L32) += snd-soc-cs35l32.o obj-$(CONFIG_SND_SOC_CS35L32) += snd-soc-cs35l32.o
obj-$(CONFIG_SND_SOC_CS35L33) += snd-soc-cs35l33.o obj-$(CONFIG_SND_SOC_CS35L33) += snd-soc-cs35l33.o
obj-$(CONFIG_SND_SOC_CS35L34) += snd-soc-cs35l34.o
obj-$(CONFIG_SND_SOC_CS42L51) += snd-soc-cs42l51.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_CS42L51_I2C) += snd-soc-cs42l51-i2c.o
obj-$(CONFIG_SND_SOC_CS42L52) += snd-soc-cs42l52.o obj-$(CONFIG_SND_SOC_CS42L52) += snd-soc-cs42l52.o
......
This diff is collapsed.
This diff is collapsed.
...@@ -183,7 +183,7 @@ static int fsl_asoc_card_hw_params(struct snd_pcm_substream *substream, ...@@ -183,7 +183,7 @@ static int fsl_asoc_card_hw_params(struct snd_pcm_substream *substream,
return 0; return 0;
} }
static struct snd_soc_ops fsl_asoc_card_ops = { static const struct snd_soc_ops fsl_asoc_card_ops = {
.hw_params = fsl_asoc_card_hw_params, .hw_params = fsl_asoc_card_hw_params,
}; };
......
...@@ -61,7 +61,7 @@ static int imx_hifi_hw_params(struct snd_pcm_substream *substream, ...@@ -61,7 +61,7 @@ static int imx_hifi_hw_params(struct snd_pcm_substream *substream,
return 0; return 0;
} }
static struct snd_soc_ops imx_hifi_ops = { static const struct snd_soc_ops imx_hifi_ops = {
.hw_params = imx_hifi_hw_params, .hw_params = imx_hifi_hw_params,
}; };
......
...@@ -174,7 +174,7 @@ static int asoc_simple_card_hw_params(struct snd_pcm_substream *substream, ...@@ -174,7 +174,7 @@ static int asoc_simple_card_hw_params(struct snd_pcm_substream *substream,
return ret; return ret;
} }
static struct snd_soc_ops asoc_simple_card_ops = { static const struct snd_soc_ops asoc_simple_card_ops = {
.startup = asoc_simple_card_startup, .startup = asoc_simple_card_startup,
.shutdown = asoc_simple_card_shutdown, .shutdown = asoc_simple_card_shutdown,
.hw_params = asoc_simple_card_hw_params, .hw_params = asoc_simple_card_hw_params,
......
...@@ -59,7 +59,7 @@ static void asoc_simple_card_shutdown(struct snd_pcm_substream *substream) ...@@ -59,7 +59,7 @@ static void asoc_simple_card_shutdown(struct snd_pcm_substream *substream)
clk_disable_unprepare(dai_props->clk); clk_disable_unprepare(dai_props->clk);
} }
static struct snd_soc_ops asoc_simple_card_ops = { static const struct snd_soc_ops asoc_simple_card_ops = {
.startup = asoc_simple_card_startup, .startup = asoc_simple_card_startup,
.shutdown = asoc_simple_card_shutdown, .shutdown = asoc_simple_card_shutdown,
}; };
......
...@@ -156,7 +156,7 @@ static int bdw_rt5677_hw_params(struct snd_pcm_substream *substream, ...@@ -156,7 +156,7 @@ static int bdw_rt5677_hw_params(struct snd_pcm_substream *substream,
return ret; return ret;
} }
static struct snd_soc_ops bdw_rt5677_ops = { static const struct snd_soc_ops bdw_rt5677_ops = {
.hw_params = bdw_rt5677_hw_params, .hw_params = bdw_rt5677_hw_params,
}; };
......
...@@ -259,7 +259,7 @@ static int broxton_da7219_hw_free(struct snd_pcm_substream *substream) ...@@ -259,7 +259,7 @@ static int broxton_da7219_hw_free(struct snd_pcm_substream *substream)
return ret; return ret;
} }
static struct snd_soc_ops broxton_da7219_ops = { static const struct snd_soc_ops broxton_da7219_ops = {
.hw_params = broxton_da7219_hw_params, .hw_params = broxton_da7219_hw_params,
.hw_free = broxton_da7219_hw_free, .hw_free = broxton_da7219_hw_free,
}; };
...@@ -309,7 +309,7 @@ static int broxton_refcap_startup(struct snd_pcm_substream *substream) ...@@ -309,7 +309,7 @@ static int broxton_refcap_startup(struct snd_pcm_substream *substream)
&constraints_16000); &constraints_16000);
}; };
static struct snd_soc_ops broxton_refcap_ops = { static const struct snd_soc_ops broxton_refcap_ops = {
.startup = broxton_refcap_startup, .startup = broxton_refcap_startup,
}; };
......
...@@ -181,7 +181,7 @@ static int broxton_rt298_hw_params(struct snd_pcm_substream *substream, ...@@ -181,7 +181,7 @@ static int broxton_rt298_hw_params(struct snd_pcm_substream *substream,
return ret; return ret;
} }
static struct snd_soc_ops broxton_rt298_ops = { static const struct snd_soc_ops broxton_rt298_ops = {
.hw_params = broxton_rt298_hw_params, .hw_params = broxton_rt298_hw_params,
}; };
...@@ -230,7 +230,7 @@ static int broxton_dmic_startup(struct snd_pcm_substream *substream) ...@@ -230,7 +230,7 @@ static int broxton_dmic_startup(struct snd_pcm_substream *substream)
SNDRV_PCM_HW_PARAM_RATE, &constraints_rates); SNDRV_PCM_HW_PARAM_RATE, &constraints_rates);
} }
static struct snd_soc_ops broxton_dmic_ops = { static const struct snd_soc_ops broxton_dmic_ops = {
.startup = broxton_dmic_startup, .startup = broxton_dmic_startup,
}; };
......
...@@ -595,11 +595,11 @@ static int byt_rt5640_aif1_startup(struct snd_pcm_substream *substream) ...@@ -595,11 +595,11 @@ static int byt_rt5640_aif1_startup(struct snd_pcm_substream *substream)
SNDRV_PCM_HW_PARAM_RATE, 48000); SNDRV_PCM_HW_PARAM_RATE, 48000);
} }
static struct snd_soc_ops byt_rt5640_aif1_ops = { static const struct snd_soc_ops byt_rt5640_aif1_ops = {
.startup = byt_rt5640_aif1_startup, .startup = byt_rt5640_aif1_startup,
}; };
static struct snd_soc_ops byt_rt5640_be_ssp2_ops = { static const struct snd_soc_ops byt_rt5640_be_ssp2_ops = {
.hw_params = byt_rt5640_aif1_hw_params, .hw_params = byt_rt5640_aif1_hw_params,
}; };
......
...@@ -219,11 +219,11 @@ static int byt_rt5651_aif1_startup(struct snd_pcm_substream *substream) ...@@ -219,11 +219,11 @@ static int byt_rt5651_aif1_startup(struct snd_pcm_substream *substream)
&constraints_48000); &constraints_48000);
} }
static struct snd_soc_ops byt_rt5651_aif1_ops = { static const struct snd_soc_ops byt_rt5651_aif1_ops = {
.startup = byt_rt5651_aif1_startup, .startup = byt_rt5651_aif1_startup,
}; };
static struct snd_soc_ops byt_rt5651_be_ssp2_ops = { static const struct snd_soc_ops byt_rt5651_be_ssp2_ops = {
.hw_params = byt_rt5651_aif1_hw_params, .hw_params = byt_rt5651_aif1_hw_params,
}; };
......
...@@ -204,11 +204,11 @@ static int cht_max98090_headset_init(struct snd_soc_component *component) ...@@ -204,11 +204,11 @@ static int cht_max98090_headset_init(struct snd_soc_component *component)
return ts3a227e_enable_jack_detect(component, &ctx->jack); return ts3a227e_enable_jack_detect(component, &ctx->jack);
} }
static struct snd_soc_ops cht_aif1_ops = { static const struct snd_soc_ops cht_aif1_ops = {
.startup = cht_aif1_startup, .startup = cht_aif1_startup,
}; };
static struct snd_soc_ops cht_be_ssp2_ops = { static const struct snd_soc_ops cht_be_ssp2_ops = {
.hw_params = cht_aif1_hw_params, .hw_params = cht_aif1_hw_params,
}; };
......
...@@ -251,11 +251,11 @@ static int cht_aif1_startup(struct snd_pcm_substream *substream) ...@@ -251,11 +251,11 @@ static int cht_aif1_startup(struct snd_pcm_substream *substream)
SNDRV_PCM_HW_PARAM_RATE, 48000); SNDRV_PCM_HW_PARAM_RATE, 48000);
} }
static struct snd_soc_ops cht_aif1_ops = { static const struct snd_soc_ops cht_aif1_ops = {
.startup = cht_aif1_startup, .startup = cht_aif1_startup,
}; };
static struct snd_soc_ops cht_be_ssp2_ops = { static const struct snd_soc_ops cht_be_ssp2_ops = {
.hw_params = cht_aif1_hw_params, .hw_params = cht_aif1_hw_params,
}; };
......
...@@ -227,11 +227,11 @@ static int cht_aif1_startup(struct snd_pcm_substream *substream) ...@@ -227,11 +227,11 @@ static int cht_aif1_startup(struct snd_pcm_substream *substream)
SNDRV_PCM_HW_PARAM_RATE, 48000); SNDRV_PCM_HW_PARAM_RATE, 48000);
} }
static struct snd_soc_ops cht_aif1_ops = { static const struct snd_soc_ops cht_aif1_ops = {
.startup = cht_aif1_startup, .startup = cht_aif1_startup,
}; };
static struct snd_soc_ops cht_be_ssp2_ops = { static const struct snd_soc_ops cht_be_ssp2_ops = {
.hw_params = cht_aif1_hw_params, .hw_params = cht_aif1_hw_params,
}; };
......
...@@ -81,7 +81,7 @@ static int haswell_rt5640_hw_params(struct snd_pcm_substream *substream, ...@@ -81,7 +81,7 @@ static int haswell_rt5640_hw_params(struct snd_pcm_substream *substream,
return ret; return ret;
} }
static struct snd_soc_ops haswell_rt5640_ops = { static const struct snd_soc_ops haswell_rt5640_ops = {
.hw_params = haswell_rt5640_hw_params, .hw_params = haswell_rt5640_hw_params,
}; };
......
...@@ -332,7 +332,7 @@ static int skylake_nau8825_hw_params(struct snd_pcm_substream *substream, ...@@ -332,7 +332,7 @@ static int skylake_nau8825_hw_params(struct snd_pcm_substream *substream,
return ret; return ret;
} }
static struct snd_soc_ops skylake_nau8825_ops = { static const struct snd_soc_ops skylake_nau8825_ops = {
.hw_params = skylake_nau8825_hw_params, .hw_params = skylake_nau8825_hw_params,
}; };
...@@ -382,7 +382,7 @@ static int skylake_dmic_startup(struct snd_pcm_substream *substream) ...@@ -382,7 +382,7 @@ static int skylake_dmic_startup(struct snd_pcm_substream *substream)
SNDRV_PCM_HW_PARAM_RATE, &constraints_rates); SNDRV_PCM_HW_PARAM_RATE, &constraints_rates);
} }
static struct snd_soc_ops skylake_dmic_ops = { static const struct snd_soc_ops skylake_dmic_ops = {
.startup = skylake_dmic_startup, .startup = skylake_dmic_startup,
}; };
...@@ -416,7 +416,7 @@ static int skylake_refcap_startup(struct snd_pcm_substream *substream) ...@@ -416,7 +416,7 @@ static int skylake_refcap_startup(struct snd_pcm_substream *substream)
&constraints_16000); &constraints_16000);
} }
static struct snd_soc_ops skylaye_refcap_ops = { static const struct snd_soc_ops skylaye_refcap_ops = {
.startup = skylake_refcap_startup, .startup = skylake_refcap_startup,
}; };
......
...@@ -394,7 +394,7 @@ static int skylake_nau8825_hw_params(struct snd_pcm_substream *substream, ...@@ -394,7 +394,7 @@ static int skylake_nau8825_hw_params(struct snd_pcm_substream *substream,
return ret; return ret;
} }
static struct snd_soc_ops skylake_nau8825_ops = { static const struct snd_soc_ops skylake_nau8825_ops = {
.hw_params = skylake_nau8825_hw_params, .hw_params = skylake_nau8825_hw_params,
}; };
...@@ -430,7 +430,7 @@ static int skylake_dmic_startup(struct snd_pcm_substream *substream) ...@@ -430,7 +430,7 @@ static int skylake_dmic_startup(struct snd_pcm_substream *substream)
SNDRV_PCM_HW_PARAM_RATE, &constraints_rates); SNDRV_PCM_HW_PARAM_RATE, &constraints_rates);
} }
static struct snd_soc_ops skylake_dmic_ops = { static const struct snd_soc_ops skylake_dmic_ops = {
.startup = skylake_dmic_startup, .startup = skylake_dmic_startup,
}; };
...@@ -464,7 +464,7 @@ static int skylake_refcap_startup(struct snd_pcm_substream *substream) ...@@ -464,7 +464,7 @@ static int skylake_refcap_startup(struct snd_pcm_substream *substream)
&constraints_16000); &constraints_16000);
} }
static struct snd_soc_ops skylaye_refcap_ops = { static const struct snd_soc_ops skylaye_refcap_ops = {
.startup = skylake_refcap_startup, .startup = skylake_refcap_startup,
}; };
......
...@@ -250,7 +250,7 @@ static int skylake_rt286_hw_params(struct snd_pcm_substream *substream, ...@@ -250,7 +250,7 @@ static int skylake_rt286_hw_params(struct snd_pcm_substream *substream,
return ret; return ret;
} }
static struct snd_soc_ops skylake_rt286_ops = { static const struct snd_soc_ops skylake_rt286_ops = {
.hw_params = skylake_rt286_hw_params, .hw_params = skylake_rt286_hw_params,
}; };
...@@ -289,7 +289,7 @@ static int skylake_dmic_startup(struct snd_pcm_substream *substream) ...@@ -289,7 +289,7 @@ static int skylake_dmic_startup(struct snd_pcm_substream *substream)
SNDRV_PCM_HW_PARAM_RATE, &constraints_rates); SNDRV_PCM_HW_PARAM_RATE, &constraints_rates);
} }
static struct snd_soc_ops skylake_dmic_ops = { static const struct snd_soc_ops skylake_dmic_ops = {
.startup = skylake_dmic_startup, .startup = skylake_dmic_startup,
}; };
......
...@@ -42,7 +42,7 @@ static int a370db_hw_params(struct snd_pcm_substream *substream, ...@@ -42,7 +42,7 @@ static int a370db_hw_params(struct snd_pcm_substream *substream,
return snd_soc_dai_set_sysclk(codec_dai, 0, freq, SND_SOC_CLOCK_IN); return snd_soc_dai_set_sysclk(codec_dai, 0, freq, SND_SOC_CLOCK_IN);
} }
static struct snd_soc_ops a370db_ops = { static const struct snd_soc_ops a370db_ops = {
.hw_params = a370db_hw_params, .hw_params = a370db_hw_params,
}; };
......
...@@ -68,7 +68,7 @@ static int mxs_sgtl5000_hw_params(struct snd_pcm_substream *substream, ...@@ -68,7 +68,7 @@ static int mxs_sgtl5000_hw_params(struct snd_pcm_substream *substream,
return 0; return 0;
} }
static struct snd_soc_ops mxs_sgtl5000_hifi_ops = { static const struct snd_soc_ops mxs_sgtl5000_hifi_ops = {
.hw_params = mxs_sgtl5000_hw_params, .hw_params = mxs_sgtl5000_hw_params,
}; };
......
This diff is collapsed.
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment