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

Unverified Commit 5a477f39 authored by Mark Brown's avatar Mark Brown
Browse files

Merge remote-tracking branches 'asoc/topic/si476x', 'asoc/topic/simple',...

Merge remote-tracking branches 'asoc/topic/si476x', 'asoc/topic/simple', 'asoc/topic/spdif', 'asoc/topic/st-dfsdm' and 'asoc/topic/stm32' into asoc-next
Loading
Loading
Loading
Loading
+3 −0
Original line number Diff line number Diff line
@@ -140,6 +140,7 @@ sound {
	simple-audio-card,name = "Cubox Audio";

	simple-audio-card,dai-link@0 {		/* I2S - HDMI */
		reg = <0>;
		format = "i2s";
		cpu {
			sound-dai = <&audio1 0>;
@@ -150,6 +151,7 @@ sound {
	};

	simple-audio-card,dai-link@1 {		/* S/PDIF - HDMI */
		reg = <1>;
		cpu {
			sound-dai = <&audio1 1>;
		};
@@ -159,6 +161,7 @@ sound {
	};

	simple-audio-card,dai-link@2 {		/* S/PDIF - S/PDIF */
		reg = <2>;
		cpu {
			sound-dai = <&audio1 1>;
		};
+63 −0
Original line number Diff line number Diff line
STMicroelectronics Audio Digital Filter Sigma Delta modulators(DFSDM)

The DFSDM allows PDM microphones capture through SPI interface. The Audio
interface is seems as a sub block of the DFSDM device.
For details on DFSDM bindings refer to ../iio/adc/st,stm32-dfsdm-adc.txt

Required properties:
  - compatible: "st,stm32h7-dfsdm-dai".

  - #sound-dai-cells : Must be equal to 0

  - io-channels : phandle to iio dfsdm instance node.

Example of a sound card using audio DFSDM node.

	sound_card {
		compatible = "audio-graph-card";

		dais = <&cpu_port>;
	};

	dfsdm: dfsdm@40017000 {
		compatible = "st,stm32h7-dfsdm";
		reg = <0x40017000 0x400>;
		clocks = <&rcc DFSDM1_CK>;
		clock-names = "dfsdm";
		#interrupt-cells = <1>;
		#address-cells = <1>;
		#size-cells = <0>;

		dfsdm_adc0: filter@0 {
			compatible = "st,stm32-dfsdm-dmic";
			reg = <0>;
			interrupts = <110>;
			dmas = <&dmamux1 101 0x400 0x00>;
			dma-names = "rx";
			st,adc-channels = <1>;
			st,adc-channel-names = "dmic0";
			st,adc-channel-types = "SPI_R";
			st,adc-channel-clk-src = "CLKOUT";
			st,filter-order = <5>;

			dfsdm_dai0: dfsdm-dai {
				compatible = "st,stm32h7-dfsdm-dai";
				#sound-dai-cells = <0>;
				io-channels = <&dfsdm_adc0 0>;
				cpu_port: port {
				dfsdm_endpoint: endpoint {
					remote-endpoint = <&dmic0_endpoint>;
				};
			};
		};
	};

	dmic0: dmic@0 {
		compatible = "dmic-codec";
		#sound-dai-cells = <0>;
		port {
			dmic0_endpoint: endpoint {
				remote-endpoint = <&dfsdm_endpoint>;
			};
		};
	};
+7 −5
Original line number Diff line number Diff line
@@ -20,11 +20,6 @@ Required properties:

Optional properties:
  - resets: Reference to a reset controller asserting the SAI
  - st,sync: specify synchronization mode.
	By default SAI sub-block is in asynchronous mode.
	This property sets SAI sub-block as slave of another SAI sub-block.
	Must contain the phandle and index of the sai sub-block providing
	the synchronization.

SAI subnodes:
Two subnodes corresponding to SAI sub-block instances A et B can be defined.
@@ -44,6 +39,13 @@ SAI subnodes required properties:
  - pinctrl-names: should contain only value "default"
  - pinctrl-0: see Documentation/devicetree/bindings/pinctrl/pinctrl-stm32.txt

SAI subnodes Optional properties:
  - st,sync: specify synchronization mode.
	By default SAI sub-block is in asynchronous mode.
	This property sets SAI sub-block as slave of another SAI sub-block.
	Must contain the phandle and index of the sai sub-block providing
	the synchronization.

The device node should contain one 'port' child node with one child 'endpoint'
node, according to the bindings defined in Documentation/devicetree/bindings/
graph.txt.
+6 −3
Original line number Diff line number Diff line
@@ -231,14 +231,17 @@ static struct snd_soc_dai_driver si476x_dai = {
	.ops		= &si476x_dai_ops,
};

static struct regmap *si476x_get_regmap(struct device *dev)
static int si476x_probe(struct snd_soc_component *component)
{
	return dev_get_regmap(dev->parent, NULL);
	snd_soc_component_init_regmap(component,
				dev_get_regmap(component->dev->parent, NULL));

	return 0;
}

static const struct snd_soc_codec_driver soc_codec_dev_si476x = {
	.get_regmap = si476x_get_regmap,
	.component_driver = {
		.probe			= si476x_probe,
		.dapm_widgets		= si476x_dapm_widgets,
		.num_dapm_widgets	= ARRAY_SIZE(si476x_dapm_widgets),
		.dapm_routes		= si476x_dapm_routes,
+3 −2
Original line number Diff line number Diff line
@@ -35,9 +35,10 @@ static const struct snd_soc_dapm_route dir_routes[] = {
#define STUB_FORMATS	(SNDRV_PCM_FMTBIT_S16_LE | \
			SNDRV_PCM_FMTBIT_S20_3LE | \
			SNDRV_PCM_FMTBIT_S24_LE  | \
			SNDRV_PCM_FMTBIT_S32_LE | \
			SNDRV_PCM_FMTBIT_IEC958_SUBFRAME_LE)

static const struct snd_soc_codec_driver soc_codec_spdif_dir = {
static struct snd_soc_codec_driver soc_codec_spdif_dir = {
	.component_driver = {
		.dapm_widgets		= dir_widgets,
		.num_dapm_widgets	= ARRAY_SIZE(dir_widgets),
Loading