Commit 920f2ecd authored by Linus Torvalds's avatar Linus Torvalds
Browse files
Pull sound updates from Takashi Iwai:
 "This development cycle resulted in a fair amount of changes in both
  core and driver sides. The most significant change in ALSA core is
  about PCM. Also the support of of-graph card and the new DAPM widget
  for DSP are noteworthy changes in ASoC core. And there're lots of
  small changes splat over the tree, as you can see in diffstat.

  Below are a few highlights:

  ALSA core:
   - Removal of set_fs() hackery from PCM core stuff, and the code
     reorganization / optimization thereafter
   - Improved support of PCM ack ops, and a new ABI for improved
     control/status mmap handling
   - Lots of constifications in various codes

  ASoC core:
   - The support of of-graph card, which may work as a better generic
     device for a replacement of simple-card
   - New widget types intended mainly for use with DSPs

  ASoC drivers:
   - New drivers for Allwinner V3s SoCs
   - Ensonic ES8316 codec support
   - More Intel SKL and KBL works
   - More device support for Intel SST Atom (mostly for cheap tablets
     and 2-in-1 devices)
   - Support for Rockchip PDM controllers
   - Support for STM32 I2S and S/PDIF controllers
   - Support for ZTE AUD96P22 codecs

  HD-audio:
   - Support of new Realtek codecs (ALC215/ALC285/ALC289), more quirks
     for HP and Dell machines
   - A few more fixes for i915 component binding"

* tag 'sound-4.13-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound: (418 commits)
  ALSA: hda - Fix unbalance of i915 module refcount
  ASoC: Intel: Skylake: Remove driver debugfs exit
  ASoC: Intel: Skylake: explicitly add the headers sst-dsp.h
  ALSA: hda/realtek - Remove GPIO_MASK
  ALSA: hda/realtek - Fix typo of pincfg for Dell quirk
  ALSA: pcm: add a documentation for tracepoints
  ALSA: atmel: ac97c: fix error return code in atmel_ac97c_probe()
  ALSA: x86: fix error return code in hdmi_lpe_audio_probe()
  ASoC: Intel: Skylake: Add support to read firmware registers
  ASoC: Intel: Skylake: Add sram address to sst_addr structure
  ASoC: Intel: Skylake: Debugfs facility to dump module config
  ASoC: Intel: Skylake: Add debugfs support
  ASoC: fix semicolon.cocci warnings
  ASoC: rt5645: Add quirk override by module option
  ASoC: rsnd: make arrays path and cmd_case static const
  ASoC: audio-graph-card: add widgets and routing for external amplifier support
  ASoC: audio-graph-card: update bindings for amplifier support
  ASoC: rt5665: calibration should be done before jack detection
  ASoC: rsnd: constify dev_pm_ops structures.
  ASoC: nau8825: change crosstalk-bypass property to bool type
  ...
parents 9ced560b fc18282c
Loading
Loading
Loading
Loading
+8 −0
Original line number Diff line number Diff line
@@ -78,6 +78,7 @@ graph bindings specified in Documentation/devicetree/bindings/graph.txt.
  remote endpoint phandle should be a reference to a valid mipi_dsi_host device
  node.
- Video port 1 for the HDMI output
- Audio port 2 for the HDMI audio input


Example
@@ -112,5 +113,12 @@ Example
					remote-endpoint = <&hdmi_connector_in>;
				};
			};

			port@2 {
				reg = <2>;
				codec_endpoint: endpoint {
					remote-endpoint = <&i2s0_cpu_endpoint>;
				};
			};
		};
	};
+8 −1
Original line number Diff line number Diff line
@@ -25,7 +25,8 @@ Required properties:
- clock-names: Shall contain "iahb" and "isfr" as defined in dw_hdmi.txt.
- ports: See dw_hdmi.txt. The DWC HDMI shall have one port numbered 0
  corresponding to the video input of the controller and one port numbered 1
  corresponding to its HDMI output. Each port shall have a single endpoint.
  corresponding to its HDMI output, and one port numbered 2 corresponding to
  sound input of the controller. Each port shall have a single endpoint.

Optional properties:

@@ -59,6 +60,12 @@ Example:
					remote-endpoint = <&hdmi0_con>;
				};
			};
			port@2 {
				reg = <2>;
				rcar_dw_hdmi0_sound_in: endpoint {
					remote-endpoint = <&hdmi_sound_out>;
				};
			};
		};
	};

+129 −0
Original line number Diff line number Diff line
Audio Graph Card:

Audio Graph Card specifies audio DAI connections of SoC <-> codec.
It is based on common bindings for device graphs.
see ${LINUX}/Documentation/devicetree/bindings/graph.txt

Basically, Audio Graph Card property is same as Simple Card.
see ${LINUX}/Documentation/devicetree/bindings/sound/simple-card.txt

Below are same as Simple-Card.

- label
- widgets
- routing
- dai-format
- frame-master
- bitclock-master
- bitclock-inversion
- frame-inversion
- dai-tdm-slot-num
- dai-tdm-slot-width
- clocks / system-clock-frequency

Required properties:

- compatible				: "audio-graph-card";
- dais					: list of CPU DAI port{s}

Optional properties:
- pa-gpios: GPIO used to control external amplifier.

Example: Single DAI case

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

		dais = <&cpu_port>;
	};

	dai-controller {
		...
		cpu_port: port {
			cpu_endpoint: endpoint {
				remote-endpoint = <&codec_endpoint>;

				dai-format = "left_j";
				...
			};
		};
	};

	audio-codec {
		...
		port {
			codec_endpoint: endpoint {
				remote-endpoint = <&cpu_endpoint>;
			};
		};
	};

Example: Multi DAI case

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

		label = "sound-card";

		dais = <&cpu_port0
			&cpu_port1
			&cpu_port2>;
	};

	audio-codec@0 {
		...
		port {
			codec0_endpoint: endpoint {
				remote-endpoint = <&cpu_endpoint0>;
			};
		};
	};

	audio-codec@1 {
		...
		port {
			codec1_endpoint: endpoint {
				remote-endpoint = <&cpu_endpoint1>;
			};
		};
	};

	audio-codec@2 {
		...
		port {
			codec2_endpoint: endpoint {
				remote-endpoint = <&cpu_endpoint2>;
			};
		};
	};

	dai-controller {
		...
		ports {
			cpu_port0: port@0 {
				cpu_endpoint0: endpoint {
					remote-endpoint = <&codec0_endpoint>;

					dai-format = "left_j";
					...
				};
			};
			cpu_port1: port@1 {
				cpu_endpoint1: endpoint {
					remote-endpoint = <&codec1_endpoint>;

					dai-format = "i2s";
					...
				};
			};
			cpu_port2: port@2 {
				cpu_endpoint2: endpoint {
					remote-endpoint = <&codec2_endpoint>;

					dai-format = "i2s";
					...
				};
			};
		};
	};
+122 −0
Original line number Diff line number Diff line
Audio-Graph-SCU-Card:

Audio-Graph-SCU-Card is "Audio-Graph-Card" + "ALSA DPCM".

It is based on common bindings for device graphs.
see ${LINUX}/Documentation/devicetree/bindings/graph.txt

Basically, Audio-Graph-SCU-Card property is same as
Simple-Card / Simple-SCU-Card / Audio-Graph-Card.
see ${LINUX}/Documentation/devicetree/bindings/sound/simple-card.txt
    ${LINUX}/Documentation/devicetree/bindings/sound/simple-scu-card.txt
    ${LINUX}/Documentation/devicetree/bindings/sound/audio-graph-card.txt

Below are same as Simple-Card / Audio-Graph-Card.

- label
- dai-format
- frame-master
- bitclock-master
- bitclock-inversion
- frame-inversion
- dai-tdm-slot-num
- dai-tdm-slot-width
- clocks / system-clock-frequency

Below are same as Simple-SCU-Card.

- convert-rate
- convert-channels
- prefix
- routing

Required properties:

- compatible				: "audio-graph-scu-card";
- dais					: list of CPU DAI port{s}

Example 1. Sampling Rate Conversion

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

		label = "sound-card";
		prefix = "codec";
		routing = "codec Playback", "DAI0 Playback",
			"codec Playback", "DAI1 Playback";
		convert-rate = <48000>;

		dais = <&cpu_port>;
	};

	audio-codec {
		...

		port {
			codec_endpoint: endpoint {
				remote-endpoint = <&cpu_endpoint>;
			};
		};
	};

	dai-controller {
		...
		cpu_port: port {
			cpu_endpoint: endpoint {
				remote-endpoint = <&codec_endpoint>;

				dai-format = "left_j";
				...
			};
		};
	};

Example 2. 2 CPU 1 Codec (Mixing)

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

		label = "sound-card";
		prefix = "codec";
		routing = "codec Playback", "DAI0 Playback",
			"codec Playback", "DAI1 Playback";
		convert-rate = <48000>;

		dais = <&cpu_port0
			&cpu_port1>;
	};

	audio-codec {
		...

		port {
			codec_endpoint0: endpoint {
				remote-endpoint = <&cpu_endpoint0>;
			};
			codec_endpoint1: endpoint {
				remote-endpoint = <&cpu_endpoint1>;
			};
		};
	};

	dai-controller {
		...
		ports {
			cpu_port0: port {
				cpu_endpoint0: endpoint {
					remote-endpoint = <&codec_endpoint0>;

					dai-format = "left_j";
					...
				};
			};
			cpu_port1: port {
				cpu_endpoint1: endpoint {
					remote-endpoint = <&codec_endpoint1>;

					dai-format = "left_j";
					...
				};
			};
		};
	};
+3 −0
Original line number Diff line number Diff line
@@ -16,6 +16,9 @@ Required properties:
    (See Documentation/devicetree/bindings/interrupt-controller/interrupts.txt
    for further information relating to interrupt properties)

 - cirrus,boost-ind-nanohenry: Inductor value for boost converter. The value is
    in nH and they can be values of 1000nH, 1200nH, 1500nH, and 2200nH.

Optional properties:
  - reset-gpios : gpio used to reset the amplifier

Loading