Loading Documentation/devicetree/bindings/sound/sun4i-codec.txt 0 → 100644 +33 −0 Original line number Diff line number Diff line * Allwinner A10 Codec Required properties: - compatible: must be either "allwinner,sun4i-a10-codec" or "allwinner,sun7i-a20-codec" - reg: must contain the registers location and length - interrupts: must contain the codec interrupt - dmas: DMA channels for tx and rx dma. See the DMA client binding, Documentation/devicetree/bindings/dma/dma.txt - dma-names: should include "tx" and "rx". - clocks: a list of phandle + clock-specifer pairs, one for each entry in clock-names. - clock-names: should contain followings: - "apb": the parent APB clock for this controller - "codec": the parent module clock - routing : A list of the connections between audio components. Each entry is a pair of strings, the first being the connection's sink, the second being the connection's source. Example: codec: codec@01c22c00 { #sound-dai-cells = <0>; compatible = "allwinner,sun7i-a20-codec"; reg = <0x01c22c00 0x40>; interrupts = <0 30 4>; clocks = <&apb0_gates 0>, <&codec_clk>; clock-names = "apb", "codec"; dmas = <&dma 0 19>, <&dma 0 19>; dma-names = "rx", "tx"; routing = "Headphone Jack", "HP Right", "Headphone Jack", "HP Left"; }; Documentation/devicetree/bindings/sound/tdm-slot.txt +10 −1 Original line number Diff line number Diff line Loading @@ -5,10 +5,14 @@ This specifies audio DAI's TDM slot. TDM slot properties: dai-tdm-slot-num : Number of slots in use. dai-tdm-slot-width : Width in bits for each slot. dai-tdm-slot-tx-mask : Transmit direction slot mask, optional dai-tdm-slot-rx-mask : Receive direction slot mask, optional For instance: dai-tdm-slot-num = <2>; dai-tdm-slot-width = <8>; dai-tdm-slot-tx-mask = <0 1>; dai-tdm-slot-rx-mask = <1 0>; And for each spcified driver, there could be one .of_xlate_tdm_slot_mask() to specify a explicit mapping of the channels and the slots. If it's absent Loading @@ -18,3 +22,8 @@ tx and rx masks. For snd_soc_of_xlate_tdm_slot_mask(), the tx and rx masks will use a 1 bit for an active slot as default, and the default active bits are at the LSB of the masks. The explicit masks are given as array of integers, where the first number presents bit-0 (LSB), second presents bit-1, etc. Any non zero number is considered 1 and 0 is 0. snd_soc_of_xlate_tdm_slot_mask() does not do anything, if either mask is set non zero value. include/sound/simple_card.h +2 −0 Original line number Diff line number Diff line Loading @@ -19,6 +19,8 @@ struct asoc_simple_dai { unsigned int sysclk; int slots; int slot_width; unsigned int tx_slot_mask; unsigned int rx_slot_mask; struct clk *clk; }; Loading include/sound/soc.h +2 −0 Original line number Diff line number Diff line Loading @@ -1613,6 +1613,8 @@ int snd_soc_of_parse_card_name(struct snd_soc_card *card, int snd_soc_of_parse_audio_simple_widgets(struct snd_soc_card *card, const char *propname); int snd_soc_of_parse_tdm_slot(struct device_node *np, unsigned int *tx_mask, unsigned int *rx_mask, unsigned int *slots, unsigned int *slot_width); void snd_soc_of_parse_audio_prefix(struct snd_soc_card *card, Loading sound/soc/Kconfig +1 −0 Original line number Diff line number Diff line Loading @@ -58,6 +58,7 @@ source "sound/soc/sh/Kconfig" source "sound/soc/sirf/Kconfig" source "sound/soc/spear/Kconfig" source "sound/soc/sti/Kconfig" source "sound/soc/sunxi/Kconfig" source "sound/soc/tegra/Kconfig" source "sound/soc/txx9/Kconfig" source "sound/soc/ux500/Kconfig" Loading Loading
Documentation/devicetree/bindings/sound/sun4i-codec.txt 0 → 100644 +33 −0 Original line number Diff line number Diff line * Allwinner A10 Codec Required properties: - compatible: must be either "allwinner,sun4i-a10-codec" or "allwinner,sun7i-a20-codec" - reg: must contain the registers location and length - interrupts: must contain the codec interrupt - dmas: DMA channels for tx and rx dma. See the DMA client binding, Documentation/devicetree/bindings/dma/dma.txt - dma-names: should include "tx" and "rx". - clocks: a list of phandle + clock-specifer pairs, one for each entry in clock-names. - clock-names: should contain followings: - "apb": the parent APB clock for this controller - "codec": the parent module clock - routing : A list of the connections between audio components. Each entry is a pair of strings, the first being the connection's sink, the second being the connection's source. Example: codec: codec@01c22c00 { #sound-dai-cells = <0>; compatible = "allwinner,sun7i-a20-codec"; reg = <0x01c22c00 0x40>; interrupts = <0 30 4>; clocks = <&apb0_gates 0>, <&codec_clk>; clock-names = "apb", "codec"; dmas = <&dma 0 19>, <&dma 0 19>; dma-names = "rx", "tx"; routing = "Headphone Jack", "HP Right", "Headphone Jack", "HP Left"; };
Documentation/devicetree/bindings/sound/tdm-slot.txt +10 −1 Original line number Diff line number Diff line Loading @@ -5,10 +5,14 @@ This specifies audio DAI's TDM slot. TDM slot properties: dai-tdm-slot-num : Number of slots in use. dai-tdm-slot-width : Width in bits for each slot. dai-tdm-slot-tx-mask : Transmit direction slot mask, optional dai-tdm-slot-rx-mask : Receive direction slot mask, optional For instance: dai-tdm-slot-num = <2>; dai-tdm-slot-width = <8>; dai-tdm-slot-tx-mask = <0 1>; dai-tdm-slot-rx-mask = <1 0>; And for each spcified driver, there could be one .of_xlate_tdm_slot_mask() to specify a explicit mapping of the channels and the slots. If it's absent Loading @@ -18,3 +22,8 @@ tx and rx masks. For snd_soc_of_xlate_tdm_slot_mask(), the tx and rx masks will use a 1 bit for an active slot as default, and the default active bits are at the LSB of the masks. The explicit masks are given as array of integers, where the first number presents bit-0 (LSB), second presents bit-1, etc. Any non zero number is considered 1 and 0 is 0. snd_soc_of_xlate_tdm_slot_mask() does not do anything, if either mask is set non zero value.
include/sound/simple_card.h +2 −0 Original line number Diff line number Diff line Loading @@ -19,6 +19,8 @@ struct asoc_simple_dai { unsigned int sysclk; int slots; int slot_width; unsigned int tx_slot_mask; unsigned int rx_slot_mask; struct clk *clk; }; Loading
include/sound/soc.h +2 −0 Original line number Diff line number Diff line Loading @@ -1613,6 +1613,8 @@ int snd_soc_of_parse_card_name(struct snd_soc_card *card, int snd_soc_of_parse_audio_simple_widgets(struct snd_soc_card *card, const char *propname); int snd_soc_of_parse_tdm_slot(struct device_node *np, unsigned int *tx_mask, unsigned int *rx_mask, unsigned int *slots, unsigned int *slot_width); void snd_soc_of_parse_audio_prefix(struct snd_soc_card *card, Loading
sound/soc/Kconfig +1 −0 Original line number Diff line number Diff line Loading @@ -58,6 +58,7 @@ source "sound/soc/sh/Kconfig" source "sound/soc/sirf/Kconfig" source "sound/soc/spear/Kconfig" source "sound/soc/sti/Kconfig" source "sound/soc/sunxi/Kconfig" source "sound/soc/tegra/Kconfig" source "sound/soc/txx9/Kconfig" source "sound/soc/ux500/Kconfig" Loading