PDA

View Full Version : QAudioDeviceInfo availableDevices can not find sound device in embeded arm



xstream71
19th December 2013, 01:53
my environment
1. Desktop x86 ubuntu =>QT lib is 5.1.1
2. embed linux(ubuntu) arm (Beaglebone Black) ==>QT lib 4.8.1

use cross complier QT configure:
./configure -prefix /opt/qt-Arm-ubuntu -embedded arm -platform qws/linux-x86-g++ -xplatform qws/linux-arm-ubuntu -depths 16,24,32 -no-mmx -no-3dnow -no-sse -no-sse2 -no-glib -no-cups -no-largefile -no-accessibility -no-openssl -no-gtkstyle -fast -nomake demos -nomake examples -no-svg -no-phonon -no-qt3support -no-svg -qt-gfx-linuxfb -no-javascript-jit -confirm-license -opensource -no-webkit -little-endian -host-little-endian -qt-kbd-linuxinput -qt-mouse-linuxinput


i am ensure there are 2 audio output (1 is hdmi ,2 is usb audio card)
i use command : sudo aplay -l
there are really 2 audio output show like following


card 0: Black [TI BeagleBone Black], device 0: HDMI nxp-hdmi-hifi-0 []
Subdevices: 1/1
Subdevice #0: subdevice #0
card 1: Device [Generic USB Audio Device], device 0: USB Audio [USB Audio]
Subdevices: 1/1
Subdevice #0: subdevice #0


my qt code :
QList<QAudioDeviceInfo> devicesList = QAudioDeviceInfo::availableDevices(QAudio::AudioOu tput);
QAudioDeviceInfo tmpDevInfo;

qDebug()<<"Dev num = "<<devicesList.count();
for(int i = 0 ;i <devicesList.count();i++)
{

tmpDevInfo = devicesList.at(i);
qDebug()<<"DevName "<<i<<"="<<tmpDevInfo.deviceName();
}

it will show : "Dev num = 0"

can anyone tell me what's wrong

mlusr
29th September 2014, 14:16
Hi,

I am facing a similar issue on imx6 (Qt 4.8.5) and I am not able to find a way to solve it. Were you able to find a solution? If so, kindly let me know.

thanks.