How to assign USB Audio as primary sound device in android4.4.2 system

取消
显示结果 
显示  仅  | 搜索替代 
您的意思是: 

How to assign USB Audio as primary sound device in android4.4.2 system

2,643 次查看
mrleo
Contributor IV

Hi,all

My custom board is imx6q sabresd board,now I have two audio sound cards.

One is hdmi sound card,and another is usb audio sound card.

I known android 4.4.2 system is support usb audio.

Now I can found two sound cards in system.

I want to assign USB Audio as primary sound device in android 4.4.2 system.But not ok.

What should I do? Please,Anyone can give me some advices?

标签 (3)
0 项奖励
回复
5 回复数

1,341 次查看
saurabh206
Senior Contributor III

Hi

mrleo

There is different method to fulfill your requirement.

Simple solution is that you can disable HDMI sound from your kernel configuration.

In this case you will have only USB card registered.

Thanks

Saurabh

0 项奖励
回复

1,341 次查看
mrleo
Contributor IV

Hi,Saurabh Patel

First I use the Simple solution like you said,But in android 4.4.2 system open the record app,cannot record audio.and play audio also not hear sound.

I see logcat print some message like bellow.

W/audio_hw_primary( 2212): card -1, port 0 device 0x2

W/audio_hw_primary( 2212): rate 44100, channel 2 period_size 0xc0

E/audio_hw_primary( 2212): cannot open pcm_out driver 0: cannot open device '/dev/snd/pcmC4294967295D0p': No such file or directory

Thanks,

Leo

0 项奖励
回复

1,341 次查看
saurabh206
Senior Contributor III

Hi Leo,

Do you have USB device connected?

And usb audio enabled in your configuration?

0 项奖励
回复

1,341 次查看
mrleo
Contributor IV

Hi,Saurabh

Yes,USB device connected to the board.

about usb audio I can found in /proc/asound/cards.

cat /proc/asound/cards                                                        

card0/  cards                                                

0 [Device         ]: USB-Audio - USB Advanced Audio Device

                      C-Media Electronics Inc. USB Advanced Audio Device at usb-fsl-ehci.1-1.3, full

0 项奖励
回复

1,341 次查看
yixuan_guo
Contributor I

I think,

First of all ,Ignore other effects,you can use tinyplay to play a music to check the driver.

http://boundarydevices.com/hdmi/

0 项奖励
回复