On Mon, Jun 24, 2013 at 3:33 PM, Michel Stempin
<[email protected]> wrote:
> This is not the way it works: the I2S bus only carries sound samples, the
> command to control an I2S codec use a separate bus (I2C or SPI) to access the
> codec registers, which in turn are not standardized in any way.
>
> Thus, most codec chip require a specific driver: these are located into the
> "sound/soc/codecs" subdirectory within the kernel source tree.
You need three pieces...
The chip I2S driver. That one implements DMA, clocking, etc Like these
./jz4740/jz4740-i2s.c
./blackfin/bf5xx-i2s-pcm.c
./blackfin/bf5xx-i2s.c
./blackfin/bf6xx-i2s.c
./dwc/designware_i2s.c
./tegra/tegra30_i2s.c
./tegra/tegra20_i2s.c
./ux500/ux500_msp_i2s.c
./davinci/davinci-i2s.c
./pxa/pxa2xx-i2s.c
Then you bind the chip I2S driver to one of the codecs in sound /soc/codecs.
Third piece is a snippet of platform specific code that binds the
platform I2S driver to the codec.
Example from tegra DTS
tegra_i2s1: i2s@70002800 {
compatible = "nvidia,tegra20-i2s";
reg = <0x70002800 0x200>;
interrupts = <0 13 0x04>;
nvidia,dma-request-selector = <&apbdma 2>;
status = "disabled";
};
i2c@7000c000 {
status = "okay";
clock-frequency = <400000>;
wm8903: wm8903@1a {
compatible = "wlf,wm8903";
reg = <0x1a>;
interrupt-parent = <&gpio>;
interrupts = <187 0x04>;
gpio-controller;
#gpio-cells = <2>;
micdet-cfg = <0>;
micdet-delay = <100>;
gpio-cfg = <0xffffffff 0xffffffff 0 0xffffffff 0xffffffff>;
};
};
sound {
compatible = "nvidia,tegra-audio-wm8903-harmony",
"nvidia,tegra-audio-wm8903";
nvidia,model = "NVIDIA Tegra Harmony";
nvidia,audio-routing =
"Headphone Jack", "HPOUTR",
"Headphone Jack", "HPOUTL",
"Int Spk", "ROP",
"Int Spk", "RON",
"Int Spk", "LOP",
"Int Spk", "LON",
"Mic Jack", "MICBIAS",
"IN1L", "Mic Jack";
nvidia,i2s-controller = <&tegra_i2s1>;
nvidia,audio-codec = <&wm8903>;
nvidia,spkr-en-gpios = <&wm8903 2 0>;
nvidia,hp-det-gpios = <&gpio 178 0>; /* gpio PW2 */
nvidia,int-mic-en-gpios = <&gpio 184 0>; /*gpio PX0 */
nvidia,ext-mic-en-gpios = <&gpio 185 0>; /* gpio PX1 */
};
>
> -- Michel
>
> Le 24/06/2013 20:39, [email protected] a écrit :
>> I checked in the Ralink 3.3 SDK and don't see an I2S driver. Maybe no
>> one has written one?
>>
>> On Mon, Jun 24, 2013 at 7:43 AM, [email protected] <[email protected]>
>> wrote:
>>> Is there a driver for Ralink I2S already in OpenWRT? I can't identify one.
>>> If not, can someone with the Ralink SDK tell me if there is one in there?
>>> I'd like to get Ralink I2S going if it can be done without a huge
>>> amount of work.
>>>
>>> --
>>> Jon Smirl
>>> [email protected]
>>
>>
>>
--
Jon Smirl
[email protected]
_______________________________________________
openwrt-devel mailing list
[email protected]
https://lists.openwrt.org/mailman/listinfo/openwrt-devel