usb_audio_flow: determine usb host mode with serial driver

An additional method is supported to determine if the chameleon
should boot in the usb host mode.

Originally, if the file /etc/default/.usb_host_mode exists, the
chameleon would boot in the usb host mode by not entering into
the usb device mode.

In this patch, if there is a tty device, e.g., /dev/ttyUSB*, which
is found with the specified serial driver, ftdi_sio, the chameleon
would stay in the usb host mode no matter whether
/etc/default/.usb_host_mode exists or not.

Note that the usb host mode is required in order to run bluetooth
autotests that require bluetooth peripherals.

TEST=Conduct the following tests

On Chameleon board, remove the following file.
$ rm /etc/default/.usb_host_mode

Reboot chameleon board.
Run a bluetooth autotest that requires RN-42. It should pass.
(cr) $ test_that --args "chameleon_host=$CHAMELEON_IP" $DUT_IP \

Change-Id: I5ea8a252884c09a752a742dfe58290be6b46987f
Commit-Ready: Shyh-In Hwang <>
Tested-by: Shyh-In Hwang <>
Reviewed-by: Cheng-Yi Chiang <>
1 file changed