greybus: audio: Fix incorrect direction value when enabling RX
authorMark Greer <mgreer@animalcreek.com>
Sat, 20 Aug 2016 23:25:06 +0000 (16:25 -0700)
committerGreg Kroah-Hartman <gregkh@google.com>
Fri, 26 Aug 2016 11:16:11 +0000 (13:16 +0200)
The direction value passed to gb_audio_apbridgea_register_cport()
in the gbaudio_module_enable_rx() routine is TX and not RX like
it should be so fix it.

Testing Done: Recorded microphone data from a headset.

Signed-off-by: Mark Greer <mgreer@animalcreek.com>
Fixes: c80e7c6fafa5 ("audio: Split helper APIs based on stream direction")
Tested-by: Vaibhav Agarwal <vaibhav.agarwal@linaro.org>
Reviewd-by: Vaibhav Agarwal <vaibhav.agarwal@linaro.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
drivers/staging/greybus/audio_codec.c

index 3eb3d2cf014a096338178a45a62e4019160e8b23..6ebde18a5a5326cda3ebdb2f4592c1bcb9144b5d 100644 (file)
@@ -207,7 +207,7 @@ static int gbaudio_module_enable_rx(struct gbaudio_codec_info *codec,
                cportid = data->connection->hd_cport_id;
                ret = gb_audio_apbridgea_register_cport(data->connection,
                                                i2s_port, cportid,
-                                               AUDIO_APBRIDGEA_DIRECTION_TX);
+                                               AUDIO_APBRIDGEA_DIRECTION_RX);
                if (ret) {
                        dev_err_ratelimited(module->dev,
                                            "reg_cport failed:%d\n", ret);