Firefly Open Source Community

   Login   |   Register   |
New_Topic
Print Previous Topic Next Topic

Enable The I2S MCLK

60

Credits

0

Prestige

0

Contribution

registered members

Rank: 2

Credits
60

Enable The I2S MCLK

Posted at 10/8/2015 13:55:07      View:9927 | Replies:14        Print     [Copy Link] 1#
Hello,

Has anyone figured out how to enable this?

I would like to keep it on all the time.

The bit clock and frame clocks are working as expected. Now I just need to get MCLK for my application.

Thanks!

Reply

Use props Report

60

Credits

0

Prestige

0

Contribution

registered members

Rank: 2

Credits
60
Posted at 10/10/2015 00:20:44      2#
Last edited by sweckhoff In 10/19/2015 06:03 Editor

I am seeing an external MCLK during probe and then it turns off. I would like to have a constant MCLK from probe on. Is this possible with the current drivers?
Reply

Use props Report

60

Credits

0

Prestige

0

Contribution

registered members

Rank: 2

Credits
60
Posted at 10/23/2015 10:52:09      3#
It seems like the Rockchip BSP has many errors. Here is what I am seeing in the DT and the I2S driver

Device Tree (NOTE: The pinctrl has been modified because they wouldn't compile when uncommented. This was just another bug.)

473         i2s0: i2s0@10220000 {
474                 compatible = "rockchip-i2s";
475                 reg = <0x10220000 0x1000>;
476                 i2s-id = <0>;
477                 clocks = <&clk_i2s_2ch>, <&clk_i2s_2ch_out>, <&clk_gates7 2>;
478                 clock-names = "i2s_clk", "i2s_mclk", "i2s_hclk";
479                 interrupts = <GIC_SPI 19 IRQ_TYPE_LEVEL_HIGH>;
480                 dmas = <&pdma 0>, <&pdma 1>;
481                 //#dma-cells = <2>;
482                 dma-names = "tx", "rx";
483                 pinctrl-names = "default";
484                 pinctrl-0 = <&i2s0_mclk_mux0 &i2s0_sclk_mux0 &i2s0_lrckrx_mux0 &i2s0_lrcktx_mux0 &i2s0_sdi_mux0 &i2s0_sdo_mux0>;
485                 //pinctrl-0 = <&i2s0_sclk_mux0 &i2s0_lrckrx_mux0 &i2s0_lrcktx_mux0 &i2s0_sdi_mux0 &i2s0_sdo_mux0>;
486                 status = "okay";
487         };              
488                        
489         i2s1: i2s1@10200000 {
490                 compatible = "rockchip-i2s";
491                 reg = <0x10200000 0x1000>;
492                 i2s-id = <1>;
493                 clocks = <&clk_i2s_8ch>, <&clk_gates7 4>;
494                 clock-names = "i2s_clk", "i2s_hclk";
495                 interrupts = <GIC_SPI 68 IRQ_TYPE_LEVEL_HIGH>;
496                 dmas = <&pdma 14>, <&pdma 15>;
497                 //#dma-cells = <2>;
498                 dma-names = "tx", "rx";
499         };

From the I2S Driver

452 struct snd_soc_dai_driver rockchip_i2s_dai[] = {
453         {
454                 .name = "rockchip-i2s.0",
455                 .id = 0,
456                 .playback = {
457                         .channels_min = 2,
458                         .channels_max = 8,
459                         .rates = ROCKCHIP_I2S_STEREO_RATES,
460                         .formats = ROCKCHIP_I2S_FORMATS,
461                 },
462                 .capture = {
463                         .channels_min = 2,
464                         .channels_max = 2,
465                         .rates = ROCKCHIP_I2S_STEREO_RATES,
466                         .formats = ROCKCHIP_I2S_FORMATS,
467                 },
468                 .ops = &rockchip_i2s_dai_ops,
469                 .symmetric_rates = 1,
470         },
471         {
472                 .name = "rockchip-i2s.1",
473                 .id = 1,
474                 .playback = {
475                         .channels_min = 2,
476                         .channels_max = 2,
477                         .rates = ROCKCHIP_I2S_STEREO_RATES,
478                         .formats = ROCKCHIP_I2S_FORMATS,
479                 },
480                 .capture = {
481                         .channels_min = 2,
482                         .channels_max = 2,
483                         .rates = ROCKCHIP_I2S_STEREO_RATES,
484                         .formats = ROCKCHIP_I2S_FORMATS,
485                 },
486                 .ops = &rockchip_i2s_dai_ops,
487                 .symmetric_rates = 1,
488         },
489 };

The number of channels on each I2S interface are swapped! Does anyone know what's what with this?
Reply

Use props Report

60

Credits

0

Prestige

0

Contribution

registered members

Rank: 2

Credits
60
Posted at 10/31/2015 10:36:59      4#
jonsmirl Posted at 10/27/2015 05:07
The I2S section is also missing support for enabling an external I2S clock.

Thanks a lot for the help. I will look into this and let you know if it helps.

Overall this is a frustrating platform to work with.
Reply

Use props Report

You need to log in before you can reply Login | Register

This forum Credits Rules

Quick Reply Back to top Back to list