Commit 48229e59 authored by Mark A. Greer's avatar Mark A. Greer Committed by Greg Kroah-Hartman

greybus: gb-audio: Activate TX connection Bundle CPort ID

Currently, the audio driver activates & deactivates a predefined
CPort ID but that can vary depending on the manifest data of the
module.  Instead, use the TX connection's Bundle CPort ID which
contains the correct CPort ID.
Signed-off-by: default avatarMark A. Greer <mgreer@animalcreek.com>
Acked-by: default avatarJohn Stultz <john.stultz@linaro.org>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@google.com>
parent f9a4fee7
......@@ -42,8 +42,8 @@ static void gb_pcm_work(struct work_struct *work)
if (!atomic_read(&snd_dev->running)) {
if (snd_dev->cport_active) {
ret = gb_i2s_mgmt_deactivate_cport(
snd_dev->mgmt_connection,
CONFIG_I2S_REMOTE_DATA_CPORT);
snd_dev->mgmt_connection,
snd_dev->i2s_tx_connection->bundle_cport_id);
if (ret) /* XXX Do what else with failure? */
pr_err("deactivate_cport failed: %d\n", ret);
......@@ -53,7 +53,7 @@ static void gb_pcm_work(struct work_struct *work)
return;
} else if (!snd_dev->cport_active) {
ret = gb_i2s_mgmt_activate_cport(snd_dev->mgmt_connection,
CONFIG_I2S_REMOTE_DATA_CPORT);
snd_dev->i2s_tx_connection->bundle_cport_id);
if (ret)
pr_err("activate_cport failed: %d\n", ret);
......
......@@ -22,7 +22,6 @@
#define CONFIG_PERIOD_NS 1000000 /* send msg every 1ms */
#define CONFIG_COUNT_MAX 20
#define CONFIG_I2S_REMOTE_DATA_CPORT 7 /* XXX shouldn't be hardcoded...*/
/* Switch between dummy spdif and jetson rt5645 codec */
#define USE_RT5645 0
......
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