]> git.proxmox.com Git - mirror_ubuntu-zesty-kernel.git/commitdiff
greybus: gb-audio: Set clock edges to match rt5647 codec requirements
authorMark A. Greer <mgreer@animalcreek.com>
Thu, 21 May 2015 22:54:27 +0000 (15:54 -0700)
committerGreg Kroah-Hartman <gregkh@google.com>
Sat, 23 May 2015 23:13:58 +0000 (16:13 -0700)
The rt5647 codec on speaker and mediabar modules require that
the following clock edge settings:

ll_wclk_change_edge GB_I2S_MGMT_EDGE_FALLING
ll_wclk_tx_edge GB_I2S_MGMT_EDGE_RISING
ll_wclk_rx_edge GB_I2S_MGMT_EDGE_FALLING

(Those are the setting that work, at least).  So make the Greybus
audio driver configure the GPBridge with those settings.

Signed-off-by: Mark A. Greer <mgreer@animalcreek.com>
Tested-by: John Stultz <john.stultz@linaro.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
drivers/staging/greybus/audio-gb-cmds.c

index daa3181c9422633d51d7edf422853ec6568a5224..ffecf3abee5e533a389f3034b9ef8fb53d26c9f8 100644 (file)
@@ -134,8 +134,8 @@ int gb_i2s_mgmt_setup(struct gb_connection *connection)
                    (cfg->ll_wclk_role & GB_I2S_MGMT_ROLE_MASTER) &&
                    (cfg->ll_wclk_polarity & GB_I2S_MGMT_POLARITY_NORMAL) &&
                    (cfg->ll_wclk_change_edge & GB_I2S_MGMT_EDGE_FALLING) &&
-                   (cfg->ll_wclk_tx_edge & GB_I2S_MGMT_EDGE_FALLING) &&
-                   (cfg->ll_wclk_rx_edge & GB_I2S_MGMT_EDGE_RISING) &&
+                   (cfg->ll_wclk_tx_edge & GB_I2S_MGMT_EDGE_RISING) &&
+                   (cfg->ll_wclk_rx_edge & GB_I2S_MGMT_EDGE_FALLING) &&
                    (cfg->ll_data_offset == 1))
                        break;
        }
@@ -153,9 +153,9 @@ int gb_i2s_mgmt_setup(struct gb_connection *connection)
        set_cfg.config.ll_bclk_role = GB_I2S_MGMT_ROLE_MASTER;
        set_cfg.config.ll_wclk_role = GB_I2S_MGMT_ROLE_MASTER;
        set_cfg.config.ll_wclk_polarity = GB_I2S_MGMT_POLARITY_NORMAL;
-       set_cfg.config.ll_wclk_change_edge = GB_I2S_MGMT_EDGE_RISING;
-       set_cfg.config.ll_wclk_tx_edge = GB_I2S_MGMT_EDGE_FALLING;
-       set_cfg.config.ll_wclk_rx_edge = GB_I2S_MGMT_EDGE_RISING;
+       set_cfg.config.ll_wclk_change_edge = GB_I2S_MGMT_EDGE_FALLING;
+       set_cfg.config.ll_wclk_tx_edge = GB_I2S_MGMT_EDGE_RISING;
+       set_cfg.config.ll_wclk_rx_edge = GB_I2S_MGMT_EDGE_FALLING;
 
        ret = gb_i2s_mgmt_set_configuration(connection, &set_cfg);
        if (ret) {