Commit 0e995aab authored by Mark A. Greer's avatar Mark A. Greer Committed by Greg Kroah-Hartman

greybus: gb-audio: Set clock edges to match rt5647 codec requirements

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: default avatarMark A. Greer <mgreer@animalcreek.com>
Tested-by: default avatarJohn Stultz <john.stultz@linaro.org>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@google.com>
parent 8d346df0
......@@ -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) {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment