Loading Documentation/devicetree/bindings/sound/fsl,ssi.txt +18 −16 Original line number Diff line number Diff line Loading @@ -20,24 +20,8 @@ Required properties: have. - interrupt-parent: The phandle for the interrupt controller that services interrupts for this device. - fsl,playback-dma: Phandle to a node for the DMA channel to use for playback of audio. This is typically dictated by SOC design. See the notes below. - fsl,capture-dma: Phandle to a node for the DMA channel to use for capture (recording) of audio. This is typically dictated by SOC design. See the notes below. - fsl,fifo-depth: The number of elements in the transmit and receive FIFOs. This number is the maximum allowed value for SFCSR[TFWM0]. - fsl,ssi-asynchronous: If specified, the SSI is to be programmed in asynchronous mode. In this mode, pins SRCK, STCK, SRFS, and STFS must all be connected to valid signals. In synchronous mode, SRCK and SRFS are ignored. Asynchronous mode allows playback and capture to use different sample sizes and sample rates. Some drivers may require that SRCK and STCK be connected together, and SRFS and STFS be connected together. This would still allow different sample sizes, but not different sample rates. - clocks: "ipg" - Required clock for the SSI unit "baud" - Required clock for SSI master mode. Otherwise this clock is not used Loading @@ -61,6 +45,24 @@ Optional properties: - fsl,mode: The operating mode for the AC97 interface only. "ac97-slave" - AC97 mode, SSI is clock slave "ac97-master" - AC97 mode, SSI is clock master - fsl,ssi-asynchronous: If specified, the SSI is to be programmed in asynchronous mode. In this mode, pins SRCK, STCK, SRFS, and STFS must all be connected to valid signals. In synchronous mode, SRCK and SRFS are ignored. Asynchronous mode allows playback and capture to use different sample sizes and sample rates. Some drivers may require that SRCK and STCK be connected together, and SRFS and STFS be connected together. This would still allow different sample sizes, but not different sample rates. - fsl,playback-dma: Phandle to a node for the DMA channel to use for playback of audio. This is typically dictated by SOC design. See the notes below. Only used on Power Architecture. - fsl,capture-dma: Phandle to a node for the DMA channel to use for capture (recording) of audio. This is typically dictated by SOC design. See the notes below. Only used on Power Architecture. Child 'codec' node required properties: - compatible: Compatible list, contains the name of the codec Loading Documentation/devicetree/bindings/sound/hisilicon,hi6210-i2s.txt 0 → 100644 +42 −0 Original line number Diff line number Diff line * Hisilicon 6210 i2s controller Required properties: - compatible: should be one of the following: - "hisilicon,hi6210-i2s" - reg: physical base address of the i2s controller unit and length of memory mapped region. - interrupts: should contain the i2s interrupt. - clocks: a list of phandle + clock-specifier pairs, one for each entry in clock-names. - clock-names: should contain following: - "dacodec" - "i2s-base" - dmas: DMA specifiers for tx dma. See the DMA client binding, Documentation/devicetree/bindings/dma/dma.txt - dma-names: should be "tx" and "rx" - hisilicon,sysctrl-syscon: phandle to sysctrl syscon - #sound-dai-cells: Should be set to 1 (for multi-dai) - The dai cell indexes reference the following interfaces: 0: S2 interface (Currently that is the only one available, but more may be supported in the future) Example for the hi6210 i2s controller: i2s0: i2s@f7118000{ compatible = "hisilicon,hi6210-i2s"; reg = <0x0 0xf7118000 0x0 0x8000>; /* i2s unit */ interrupts = <GIC_SPI 123 IRQ_TYPE_LEVEL_HIGH>; /* 155 "DigACodec_intr"-32 */ clocks = <&sys_ctrl HI6220_DACODEC_PCLK>, <&sys_ctrl HI6220_BBPPLL0_DIV>; clock-names = "dacodec", "i2s-base"; dmas = <&dma0 15 &dma0 14>; dma-names = "rx", "tx"; hisilicon,sysctrl-syscon = <&sys_ctrl>; #sound-dai-cells = <1>; }; Then when referencing the i2s controller: sound-dai = <&i2s0 0>; /* index 0 => S2 interface */ sound/soc/Kconfig +1 −0 Original line number Diff line number Diff line Loading @@ -47,6 +47,7 @@ source "sound/soc/cirrus/Kconfig" source "sound/soc/davinci/Kconfig" source "sound/soc/dwc/Kconfig" source "sound/soc/fsl/Kconfig" source "sound/soc/hisilicon/Kconfig" source "sound/soc/jz4740/Kconfig" source "sound/soc/nuc900/Kconfig" source "sound/soc/omap/Kconfig" Loading sound/soc/Makefile +1 −0 Original line number Diff line number Diff line Loading @@ -27,6 +27,7 @@ obj-$(CONFIG_SND_SOC) += cirrus/ obj-$(CONFIG_SND_SOC) += davinci/ obj-$(CONFIG_SND_SOC) += dwc/ obj-$(CONFIG_SND_SOC) += fsl/ obj-$(CONFIG_SND_SOC) += hisilicon/ obj-$(CONFIG_SND_SOC) += jz4740/ obj-$(CONFIG_SND_SOC) += img/ obj-$(CONFIG_SND_SOC) += intel/ Loading sound/soc/fsl/fsl_ssi.c +7 −20 Original line number Diff line number Diff line Loading @@ -35,6 +35,7 @@ #include <linux/module.h> #include <linux/interrupt.h> #include <linux/clk.h> #include <linux/ctype.h> #include <linux/device.h> #include <linux/delay.h> #include <linux/slab.h> Loading @@ -54,16 +55,6 @@ #include "fsl_ssi.h" #include "imx-pcm.h" /** * FSLSSI_I2S_RATES: sample rates supported by the I2S * * This driver currently only supports the SSI running in I2S slave mode, * which means the codec determines the sample rate. Therefore, we tell * ALSA that we support all rates and let the codec driver decide what rates * are really supported. */ #define FSLSSI_I2S_RATES SNDRV_PCM_RATE_CONTINUOUS /** * FSLSSI_I2S_FORMATS: audio formats supported by the SSI * Loading Loading @@ -1212,14 +1203,14 @@ static struct snd_soc_dai_driver fsl_ssi_dai_template = { .stream_name = "CPU-Playback", .channels_min = 1, .channels_max = 32, .rates = FSLSSI_I2S_RATES, .rates = SNDRV_PCM_RATE_CONTINUOUS, .formats = FSLSSI_I2S_FORMATS, }, .capture = { .stream_name = "CPU-Capture", .channels_min = 1, .channels_max = 32, .rates = FSLSSI_I2S_RATES, .rates = SNDRV_PCM_RATE_CONTINUOUS, .formats = FSLSSI_I2S_FORMATS, }, .ops = &fsl_ssi_dai_ops, Loading Loading @@ -1325,14 +1316,10 @@ static struct snd_ac97_bus_ops fsl_ssi_ac97_ops = { */ static void make_lowercase(char *s) { char *p = s; char c; while ((c = *p)) { if ((c >= 'A') && (c <= 'Z')) *p = c + ('a' - 'A'); p++; } if (!s) return; for (; *s; s++) *s = tolower(*s); } static int fsl_ssi_imx_probe(struct platform_device *pdev, Loading Loading
Documentation/devicetree/bindings/sound/fsl,ssi.txt +18 −16 Original line number Diff line number Diff line Loading @@ -20,24 +20,8 @@ Required properties: have. - interrupt-parent: The phandle for the interrupt controller that services interrupts for this device. - fsl,playback-dma: Phandle to a node for the DMA channel to use for playback of audio. This is typically dictated by SOC design. See the notes below. - fsl,capture-dma: Phandle to a node for the DMA channel to use for capture (recording) of audio. This is typically dictated by SOC design. See the notes below. - fsl,fifo-depth: The number of elements in the transmit and receive FIFOs. This number is the maximum allowed value for SFCSR[TFWM0]. - fsl,ssi-asynchronous: If specified, the SSI is to be programmed in asynchronous mode. In this mode, pins SRCK, STCK, SRFS, and STFS must all be connected to valid signals. In synchronous mode, SRCK and SRFS are ignored. Asynchronous mode allows playback and capture to use different sample sizes and sample rates. Some drivers may require that SRCK and STCK be connected together, and SRFS and STFS be connected together. This would still allow different sample sizes, but not different sample rates. - clocks: "ipg" - Required clock for the SSI unit "baud" - Required clock for SSI master mode. Otherwise this clock is not used Loading @@ -61,6 +45,24 @@ Optional properties: - fsl,mode: The operating mode for the AC97 interface only. "ac97-slave" - AC97 mode, SSI is clock slave "ac97-master" - AC97 mode, SSI is clock master - fsl,ssi-asynchronous: If specified, the SSI is to be programmed in asynchronous mode. In this mode, pins SRCK, STCK, SRFS, and STFS must all be connected to valid signals. In synchronous mode, SRCK and SRFS are ignored. Asynchronous mode allows playback and capture to use different sample sizes and sample rates. Some drivers may require that SRCK and STCK be connected together, and SRFS and STFS be connected together. This would still allow different sample sizes, but not different sample rates. - fsl,playback-dma: Phandle to a node for the DMA channel to use for playback of audio. This is typically dictated by SOC design. See the notes below. Only used on Power Architecture. - fsl,capture-dma: Phandle to a node for the DMA channel to use for capture (recording) of audio. This is typically dictated by SOC design. See the notes below. Only used on Power Architecture. Child 'codec' node required properties: - compatible: Compatible list, contains the name of the codec Loading
Documentation/devicetree/bindings/sound/hisilicon,hi6210-i2s.txt 0 → 100644 +42 −0 Original line number Diff line number Diff line * Hisilicon 6210 i2s controller Required properties: - compatible: should be one of the following: - "hisilicon,hi6210-i2s" - reg: physical base address of the i2s controller unit and length of memory mapped region. - interrupts: should contain the i2s interrupt. - clocks: a list of phandle + clock-specifier pairs, one for each entry in clock-names. - clock-names: should contain following: - "dacodec" - "i2s-base" - dmas: DMA specifiers for tx dma. See the DMA client binding, Documentation/devicetree/bindings/dma/dma.txt - dma-names: should be "tx" and "rx" - hisilicon,sysctrl-syscon: phandle to sysctrl syscon - #sound-dai-cells: Should be set to 1 (for multi-dai) - The dai cell indexes reference the following interfaces: 0: S2 interface (Currently that is the only one available, but more may be supported in the future) Example for the hi6210 i2s controller: i2s0: i2s@f7118000{ compatible = "hisilicon,hi6210-i2s"; reg = <0x0 0xf7118000 0x0 0x8000>; /* i2s unit */ interrupts = <GIC_SPI 123 IRQ_TYPE_LEVEL_HIGH>; /* 155 "DigACodec_intr"-32 */ clocks = <&sys_ctrl HI6220_DACODEC_PCLK>, <&sys_ctrl HI6220_BBPPLL0_DIV>; clock-names = "dacodec", "i2s-base"; dmas = <&dma0 15 &dma0 14>; dma-names = "rx", "tx"; hisilicon,sysctrl-syscon = <&sys_ctrl>; #sound-dai-cells = <1>; }; Then when referencing the i2s controller: sound-dai = <&i2s0 0>; /* index 0 => S2 interface */
sound/soc/Kconfig +1 −0 Original line number Diff line number Diff line Loading @@ -47,6 +47,7 @@ source "sound/soc/cirrus/Kconfig" source "sound/soc/davinci/Kconfig" source "sound/soc/dwc/Kconfig" source "sound/soc/fsl/Kconfig" source "sound/soc/hisilicon/Kconfig" source "sound/soc/jz4740/Kconfig" source "sound/soc/nuc900/Kconfig" source "sound/soc/omap/Kconfig" Loading
sound/soc/Makefile +1 −0 Original line number Diff line number Diff line Loading @@ -27,6 +27,7 @@ obj-$(CONFIG_SND_SOC) += cirrus/ obj-$(CONFIG_SND_SOC) += davinci/ obj-$(CONFIG_SND_SOC) += dwc/ obj-$(CONFIG_SND_SOC) += fsl/ obj-$(CONFIG_SND_SOC) += hisilicon/ obj-$(CONFIG_SND_SOC) += jz4740/ obj-$(CONFIG_SND_SOC) += img/ obj-$(CONFIG_SND_SOC) += intel/ Loading
sound/soc/fsl/fsl_ssi.c +7 −20 Original line number Diff line number Diff line Loading @@ -35,6 +35,7 @@ #include <linux/module.h> #include <linux/interrupt.h> #include <linux/clk.h> #include <linux/ctype.h> #include <linux/device.h> #include <linux/delay.h> #include <linux/slab.h> Loading @@ -54,16 +55,6 @@ #include "fsl_ssi.h" #include "imx-pcm.h" /** * FSLSSI_I2S_RATES: sample rates supported by the I2S * * This driver currently only supports the SSI running in I2S slave mode, * which means the codec determines the sample rate. Therefore, we tell * ALSA that we support all rates and let the codec driver decide what rates * are really supported. */ #define FSLSSI_I2S_RATES SNDRV_PCM_RATE_CONTINUOUS /** * FSLSSI_I2S_FORMATS: audio formats supported by the SSI * Loading Loading @@ -1212,14 +1203,14 @@ static struct snd_soc_dai_driver fsl_ssi_dai_template = { .stream_name = "CPU-Playback", .channels_min = 1, .channels_max = 32, .rates = FSLSSI_I2S_RATES, .rates = SNDRV_PCM_RATE_CONTINUOUS, .formats = FSLSSI_I2S_FORMATS, }, .capture = { .stream_name = "CPU-Capture", .channels_min = 1, .channels_max = 32, .rates = FSLSSI_I2S_RATES, .rates = SNDRV_PCM_RATE_CONTINUOUS, .formats = FSLSSI_I2S_FORMATS, }, .ops = &fsl_ssi_dai_ops, Loading Loading @@ -1325,14 +1316,10 @@ static struct snd_ac97_bus_ops fsl_ssi_ac97_ops = { */ static void make_lowercase(char *s) { char *p = s; char c; while ((c = *p)) { if ((c >= 'A') && (c <= 'Z')) *p = c + ('a' - 'A'); p++; } if (!s) return; for (; *s; s++) *s = tolower(*s); } static int fsl_ssi_imx_probe(struct platform_device *pdev, Loading