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

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

Merge remote-tracking branches 'asoc/topic/msm8916', 'asoc/topic/mtk',...

Merge remote-tracking branches 'asoc/topic/msm8916', 'asoc/topic/mtk', 'asoc/topic/nau8824', 'asoc/topic/nau8825' and 'asoc/topic/of-graph' into asoc-next
Loading
Loading
Loading
Loading
+5 −0
Original line number Original line Diff line number Diff line
@@ -10,6 +10,8 @@ see ${LINUX}/Documentation/devicetree/bindings/sound/simple-card.txt
Below are same as Simple-Card.
Below are same as Simple-Card.


- label
- label
- widgets
- routing
- dai-format
- dai-format
- frame-master
- frame-master
- bitclock-master
- bitclock-master
@@ -24,6 +26,9 @@ Required properties:
- compatible				: "audio-graph-card";
- compatible				: "audio-graph-card";
- dais					: list of CPU DAI port{s}
- dais					: list of CPU DAI port{s}


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

Example: Single DAI case
Example: Single DAI case


	sound_card {
	sound_card {
+7 −2
Original line number Original line Diff line number Diff line
@@ -90,9 +90,12 @@ Example 2. 2 CPU 1 Codec (Mixing)
		...
		...


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


@@ -101,7 +104,7 @@ Example 2. 2 CPU 1 Codec (Mixing)
		ports {
		ports {
			cpu_port0: port {
			cpu_port0: port {
				cpu_endpoint0: endpoint {
				cpu_endpoint0: endpoint {
					remote-endpoint = <&codec_endpoint>;
					remote-endpoint = <&codec_endpoint0>;


					dai-format = "left_j";
					dai-format = "left_j";
					...
					...
@@ -109,6 +112,8 @@ Example 2. 2 CPU 1 Codec (Mixing)
			};
			};
			cpu_port1: port {
			cpu_port1: port {
				cpu_endpoint1: endpoint {
				cpu_endpoint1: endpoint {
					remote-endpoint = <&codec_endpoint1>;

					dai-format = "left_j";
					dai-format = "left_j";
					...
					...
				};
				};
+3 −0
Original line number Original line Diff line number Diff line
@@ -69,6 +69,8 @@ Optional properties:
  - nuvoton,jack-insert-debounce: number from 0 to 7 that sets debounce time to 2^(n+2) ms
  - nuvoton,jack-insert-debounce: number from 0 to 7 that sets debounce time to 2^(n+2) ms
  - nuvoton,jack-eject-debounce: number from 0 to 7 that sets debounce time to 2^(n+2) ms
  - nuvoton,jack-eject-debounce: number from 0 to 7 that sets debounce time to 2^(n+2) ms


  - nuvoton,crosstalk-bypass: make crosstalk function bypass if set.

  - clocks: list of phandle and clock specifier pairs according to common clock bindings for the
  - clocks: list of phandle and clock specifier pairs according to common clock bindings for the
      clocks described in clock-names
      clocks described in clock-names
  - clock-names: should include "mclk" for the MCLK master clock
  - clock-names: should include "mclk" for the MCLK master clock
@@ -96,6 +98,7 @@ Example:
      nuvoton,short-key-debounce = <2>;
      nuvoton,short-key-debounce = <2>;
      nuvoton,jack-insert-debounce = <7>;
      nuvoton,jack-insert-debounce = <7>;
      nuvoton,jack-eject-debounce = <7>;
      nuvoton,jack-eject-debounce = <7>;
      nuvoton,crosstalk-bypass;


      clock-names = "mclk";
      clock-names = "mclk";
      clocks = <&tegra_car TEGRA210_CLK_CLK_OUT_2>;
      clocks = <&tegra_car TEGRA210_CLK_CLK_OUT_2>;
+24 −0
Original line number Original line Diff line number Diff line
@@ -22,6 +22,11 @@ struct asoc_simple_dai {
	struct clk *clk;
	struct clk *clk;
};
};


struct asoc_simple_card_data {
	u32 convert_rate;
	u32 convert_channels;
};

int asoc_simple_card_parse_daifmt(struct device *dev,
int asoc_simple_card_parse_daifmt(struct device *dev,
				  struct device_node *node,
				  struct device_node *node,
				  struct device_node *codec,
				  struct device_node *codec,
@@ -45,6 +50,8 @@ int asoc_simple_card_parse_clk(struct device *dev,
			       struct device_node *dai_of_node,
			       struct device_node *dai_of_node,
			       struct asoc_simple_dai *simple_dai,
			       struct asoc_simple_dai *simple_dai,
			       const char *name);
			       const char *name);
int asoc_simple_card_clk_enable(struct asoc_simple_dai *dai);
void asoc_simple_card_clk_disable(struct asoc_simple_dai *dai);


#define asoc_simple_card_parse_cpu(node, dai_link,				\
#define asoc_simple_card_parse_cpu(node, dai_link,				\
				   list_name, cells_name, is_single_link)	\
				   list_name, cells_name, is_single_link)	\
@@ -73,6 +80,12 @@ int asoc_simple_card_parse_graph_dai(struct device_node *ep,
				     struct device_node **endpoint_np,
				     struct device_node **endpoint_np,
				     const char **dai_name);
				     const char **dai_name);


#define asoc_simple_card_of_parse_tdm(np, dai)			\
	snd_soc_of_parse_tdm_slot(np,	&(dai)->tx_slot_mask,	\
					&(dai)->rx_slot_mask,	\
					&(dai)->slots,		\
					&(dai)->slot_width);

int asoc_simple_card_init_dai(struct snd_soc_dai *dai,
int asoc_simple_card_init_dai(struct snd_soc_dai *dai,
			      struct asoc_simple_dai *simple_dai);
			      struct asoc_simple_dai *simple_dai);


@@ -82,4 +95,15 @@ void asoc_simple_card_canonicalize_cpu(struct snd_soc_dai_link *dai_link,


int asoc_simple_card_clean_reference(struct snd_soc_card *card);
int asoc_simple_card_clean_reference(struct snd_soc_card *card);


void asoc_simple_card_convert_fixup(struct asoc_simple_card_data *data,
				      struct snd_pcm_hw_params *params);
void asoc_simple_card_parse_convert(struct device *dev, char *prefix,
				    struct asoc_simple_card_data *data);

int asoc_simple_card_of_parse_routing(struct snd_soc_card *card,
				      char *prefix,
				      int optional);
int asoc_simple_card_of_parse_widgets(struct snd_soc_card *card,
				      char *prefix);

#endif /* __SIMPLE_CARD_UTILS_H */
#endif /* __SIMPLE_CARD_UTILS_H */
+3 −3
Original line number Original line Diff line number Diff line
@@ -223,8 +223,8 @@ struct pm8916_wcd_analog_priv {
	u16 codec_version;
	u16 codec_version;
	struct clk *mclk;
	struct clk *mclk;
	struct regulator_bulk_data supplies[ARRAY_SIZE(supply_names)];
	struct regulator_bulk_data supplies[ARRAY_SIZE(supply_names)];
	bool micbias1_cap_mode;
	unsigned int micbias1_cap_mode;
	bool micbias2_cap_mode;
	unsigned int micbias2_cap_mode;
};
};


static const char *const adc2_mux_text[] = { "ZERO", "INP2", "INP3" };
static const char *const adc2_mux_text[] = { "ZERO", "INP2", "INP3" };
@@ -285,7 +285,7 @@ static void pm8916_wcd_analog_micbias_enable(struct snd_soc_codec *codec)


static int pm8916_wcd_analog_enable_micbias_ext(struct snd_soc_codec
static int pm8916_wcd_analog_enable_micbias_ext(struct snd_soc_codec
						 *codec, int event,
						 *codec, int event,
						 int reg, u32 cap_mode)
						 int reg, unsigned int cap_mode)
{
{
	switch (event) {
	switch (event) {
	case SND_SOC_DAPM_POST_PMU:
	case SND_SOC_DAPM_POST_PMU:
Loading