usb dac audio as primary audio interface

35 1266
GRAVITY replied at Jan 19, 2017 13:09
here is the output of dmesg:

As I do not have much experience in this. I have asked the Actions how to do it.
So you want have an opition in the Android Setting, so that you can choose the audio output to HDMI audio, Audio Jack or USB DAC, right?

Now in Android, it will automatically detect the earphone, and when the earphone plug in, it will route the sound to earphone automatically, or it will use HDMI audio.

I also will help to google some tips. And I found the Android 5.0 support the USB DAC

https://source.android.com/devices/audio/
here seems have some description, but I can not open this link in China.

Hi
The Actions do not reply me for this requirement.

GRAVITY  
tony_zhang replied at Jan 23, 2017 21:07
Hi
The Actions do not reply me for this requirement.

Tony, hi.

I just wanna have working usb-audio-autoroute - default function on android 5.x.

On many-many android-devices what i have tested - autoroute is already working OK.

So you want have an opition in the Android Setting, so that you can choose the audio output to HDMI audio, Audio Jack or USB DAC, right?

Any additional options in the android settings - i no need. I need just standard android 5.0 future - usb audio autoroute.
IMG_3983.JPG

GRAVITY  
Pleeease help. I don't know what else to do.

GRAVITY  
Edited by GRAVITY at Feb 20, 2017 14:16

Ok...
i continue my research...

1. i successfully load sound modules by commands:
  1. insmod /misc/modules/snd-hwdep.ko
  2. insmod /misc/modules/snd-usbmidi-lib.ko
  3. insmod /misc/modules/snd-usb-audio.ko
Copy the Code


2. after step 1 i found my sound card in /proc/asound:
  1. root@guitar:/proc/asound # ls
  2. FXAUDIODACX6
  3. atm7059link
  4. card0
  5. card1
  6. cards
  7. devices
  8. hwdep
  9. pcm
  10. timers
  11. version
Copy the Code


3. alsa_aplay:
  1. 1|root@guitar:/dev/snd # alsa_aplay -l
  2. **** List of PLAYBACK Hardware Devices ****
  3. card 0: atm7059link [atm7059_link], device 0: ATC2603C PCM atc2603c-dai-0 []
  4.   Subdevices: 1/1
  5.   Subdevice #0: subdevice #0
  6. card 0: atm7059link [atm7059_link], device 1: HDMI PCM atm7059-hdmi-dai-1 []
  7.   Subdevices: 1/1
  8.   Subdevice #0: subdevice #0
  9. card 1: FXAUDIODACX6 [FX-AUDIO-DAC-X6], device 0: USB Audio [USB Audio]
  10.   Subdevices: 1/1
  11.   Subdevice #0: subdevice #0
Copy the Code


but.... i STILL CANNOT playback throught my usb-card

GRAVITY  
Edited by GRAVITY at Feb 20, 2017 13:49
GRAVITY replied at Feb 20, 2017 13:44
Ok...
i continue my research...

upd: corrected (by my opinion) file /init.extra_modules.rc: (see lines 7-8-9)
  1. on post-fs
  2. #    write /sys/class/leds/led_charger/brightness 0

  3.         # TESTCODE : disable S2
  4.   #  write /sys/power/wake_lock 1

  5.     insmod /misc/modules/snd-hwdep.ko
  6.     insmod /misc/modules/snd-usbmidi-lib.ko
  7.     insmod /misc/modules/snd-usb-audio.ko

  8.     insmod /misc/modules/flashlight.ko

  9.     insmod /misc/modules/ethernet.ko
  10.     #vibrate
  11.     insmod /misc/modules/act_vibrate.ko
  12.   
  13.     #tp
  14. #    insmod /misc/modules/ctp_gsl1680f.ko
  15.    
  16.     #gyro&gsensor&mag
  17. #    insmod /misc/modules/gyrosensor_inv_mpu6515_iio.ko

  18. #        adckeypad
  19.         insmod /misc/modules/atc260x-adckeypad.ko
  20.         
  21.     #irkey
  22.     insmod /misc/modules/atc260x-irkeypad.ko

  23. #        insmod /misc/modules/gsensor_mc3232.ko

  24.    start insmod_gsensor
  25.    wait /dev/input/event2

  26.     #tp
  27.     start insmod_ctp

  28.     setprop service.adb.tcp.port 5555   

  29.     #lightsensor
  30. #    insmod /misc/modules/lightsensor_ltr301.ko

  31.     insmod /misc/modules/hdmi.ko
  32.     write /sys/class/switch/hdmi/status 1
  33.    
  34.     #camera
  35.     #insmod /misc/modules/bisp.ko
  36.     #insmod /misc/modules/gc2035.ko
  37.     #insmod /misc/modules/gc0308.ko
  38.     #insmod /misc/modules/owl_camera.ko
  39.    
  40.     #camera auto-detect
  41.     start insmod_camera
  42.     wait /sys/rear_camera/status
  43.    
  44.     setprop ro.bt.useusb0 "1"
  45.     # bluetooth
  46. #        insmod /misc/modules/rfkill-actions_bcmdhd.ko
  47.         insmod /misc/modules/rfkill-actions_8723bs.ko
  48.         insmod /misc/modules/bt_rtl.ko
  49.     # permissions for bluetooth.
  50.     setprop ro.bt.bdaddr_path "/factory/bluetooth/bt_addr"
  51.    
  52.         chown bluetooth bluetooth ro.bt.bdaddr_path
  53.         chmod 0666 /dev/ttyS2
  54.         chown bluetooth bluetooth /dev/ttyS2
  55.         chown bluetooth bluetooth /sys/class/rfkill/rfkill0/state
  56.         chown bluetooth bluetooth /sys/class/rfkill/rfkill0/type
  57.         chmod 0766 /sys/class/rfkill/rfkill0/state

  58.         chmod 0777 /dev/ttyS*

  59.     #bcm prealloc
  60. #    insmod /misc/modules/bcmdhd_prealloc.ko

  61.     #mkdir /data/camera for camcorder_profiles.xml
  62.     mkdir /data/camera 0755 media media
  63. service insmod_gsensor /insmod_gsensor.sh
  64.     class modules
  65.     oneshot

  66. service bbaSelect /LMKBoardSelect.sh bba
  67.     class modules
  68.     oneshot

  69. service bbbSelect /LMKBoardSelect.sh bbb
  70.     class modules
  71.     oneshot

  72. service bbbplusSelect /LMKBoardSelect.sh bbbplus
  73.     class modules
  74.     oneshot

  75. service bbcSelect /LMKBoardSelect.sh bbc
  76.     class modules
  77.     oneshot

  78. service bbdSelect /LMKBoardSelect.sh bbd
  79.     class modules
  80.     oneshot

  81. service insmod_camera /insmod_camera.sh
  82.     class modules
  83.     oneshot

  84. service cp_vendor /cp_vendor_app.sh  &
  85.     class main
  86.     oneshot
  87.    
  88. service insmod_ctp /insmod_ctp.sh
  89.     class modules
  90.     oneshot

  91. service eth0_up /LMKNetwork.sh eth0 start
  92.     class modules
  93.     oneshot

  94. service eth0_up_static /LMKNetwork.sh eth0  start_static
  95.     class modules
  96.     oneshot

  97. service eth0_down /LMKNetwork.sh eth0 down
  98.     class modules
  99.     oneshot

  100. service eth1_up /LMKNetwork.sh eth1 start
  101.     class modules
  102.     oneshot

  103. service eth1_up_static /LMKNetwork.sh eth1  start_static
  104.     class modules
  105.     oneshot

  106. service eth1_down /LMKNetwork.sh eth1 down
  107.     class modules
  108.     oneshot

  109. service hdmiup /LMKNetwork.sh hdmi
  110.     class modules
  111.     oneshot

  112. service speakup /LMKNetwork.sh speak
  113.     class modules
  114.     oneshot

  115. service dhcpcd_bt-pan /system/bin/dhcpcd -ABKL
  116.     class main
  117.     disabled
  118.     oneshot system

  119. service iprenew_bt-pan /system/bin/dhcpcd -n
  120.     class main
  121.     disabled
  122.     oneshot system

  123. on charger
  124.      # start charger, load
  125.     class_start charger
Copy the Code


GRAVITY  
Edited by GRAVITY at Feb 20, 2017 14:15
  1. root@guitar:/proc/asound # cat cards
  2. 0 [atm7059link    ]: atm7059_link - atm7059_link
  3.                       atm7059_link
  4. 1 [FXAUDIODACX6   ]: USB-Audio - FX-AUDIO-DAC-X6
  5.                       FX-AUDIO FX-AUDIO-DAC-X6 at usb-aotg_hcd.1-1, full speed
Copy the Code

GRAVITY  
  1. root@guitar:/proc/asound # lsmod
  2. snd_usb_audio 90178 0 - Live 0x00000000
  3. snd_usbmidi_lib 14946 1 snd_usb_audio, Live 0x00000000
  4. snd_hwdep 4514 1 snd_usb_audio, Live 0x00000000
  5. wlan_8723bs 1304376 0 - Live 0x00000000
  6. owl_camera 27328 0 - Live 0x00000000
  7. dc_owl 6595 2 - Live 0x00000000
  8. pvrsrvkm 263750 87 dc_owl, Live 0x00000000
  9. ctp_ft5x06 11981 0 - Live 0x00000000
  10. bt_rtl 27671 0 - Live 0x00000000
  11. rfkill_actions_8723bs 2956 0 - Live 0x00000000
  12. sensor_detect 20989 0 - Live 0x00000000
  13. uvcvideo 62829 0 - Live 0x00000000
  14. videobuf2_vmalloc 2897 1 uvcvideo, Live 0x00000000
  15. atc260x_irkeypad 10986 0 - Live 0x00000000
  16. atc260x_adckeypad 4637 0 - Live 0x00000000
  17. ethernet 41073 0 - Live 0x00000000
  18. flashlight 2872 0 - Live 0x00000000
  19. atc260x_cap_gauge 24336 0 - Live 0x00000000
  20. i2c_dev 5531 0 - Live 0x00000000
  21. spidev 5336 0 - Live 0x00000000
Copy the Code

I have sent the post link to Actions engineer.

You have to log in before you can reply Login | Sign Up

Points Rules