Dear Mr. doitright,
Thank you very much for your help. Your input is really valuable and helped me a lot.
‘ls -l /sys/class/sound’ produces following on my device -
card0 → …/…/devices/platform/soc/soc:sound/sound/card0
card1 → …/…/devices/platform/soc/ff200000.hisi_usb/ff100000.dwc3/xhci-hcd.0.auto/usb1/1-1/1-1:1.0/sound/card1
controlC0 → …/…/devices/platform/soc/soc:sound/sound/card0/controlC0
controlC1 → …/…/devices/platform/soc/ff200000.hisi_usb/ff100000.dwc3/xhci-hcd.0.auto/usb1/1-1/1-1:1.0/sound/card1/controlC1
pcmC0D0p → …/…/devices/platform/soc/soc:sound/sound/card0/pcmC0D0p
pcmC0D1c → …/…/devices/platform/soc/soc:sound/sound/card0/pcmC0D1c
pcmC0D1p → …/…/devices/platform/soc/soc:sound/sound/card0/pcmC0D1p
pcmC1D0c → …/…/devices/platform/soc/ff200000.hisi_usb/ff100000.dwc3/xhci-hcd.0.auto/usb1/1-1/1-1:1.0/sound/card1/pcmC1D0c
pcmC1D0p → …/…/devices/platform/soc/ff200000.hisi_usb/ff100000.dwc3/xhci-hcd.0.auto/usb1/1-1/1-1:1.0/sound/card1/pcmC1D0p
timer → …/…/devices/virtual/sound/timer
and ls -l ‘/dev/snd’ produces following -
controlC0
controlC1
pcmC0D0p
pcmC0D1c
pcmC0D1p
pcmC1D0c
pcmC1D0p
timer
So, in my case,
USB = C1D0
BT = C0D1
I have modified ‘find_cards_devices()’ accordingly and logcat shows detection is proper -
modules.car96audio_hal.hikey: runsco: USBCARD: 1, BTCARD: 0
However, because of usb_config mismatch, ‘runsco()’ did not go through.
for USB adapter, tinypcminfo produces following -
Info for card 1, device 0:
PCM out:
Access: 0x000009
format[0]: 00000000
format[1]: 0x000001
format Name: S24_3LE
Subformat: 0x000001
Rate: min=48000Hz max=48000Hz
Channels: min=2 max=2
Sample bits: min=24 max=24
Period size: min=48 max=87381
Period count: min=2 max=1024
PCM in:
Access: 0x000009
format[0]: 00000000
format[1]: 0x000001
format Name: S24_3LE
Subformat: 0x000001
Rate: min=48000Hz max=48000Hz
Channels: min=2 max=2
Sample bits: min=24 max=24
Period size: min=48 max=87381
Period count: min=2 max=1024
tinypcminfo for BT PCM produces following -
Info for card 0, device 1:
PCM out:
Access: 0x000009
format[0]: 0x000014
format[1]: 00000000
format Name: S16_LE, U16_LE
Subformat: 0x000001
Rate: min=8000Hz max=16000Hz
Channels: min=2 max=2
Sample bits: min=16 max=16
Period size: min=256 max=1024
Period count: min=4 max=64
PCM in:
Access: 0x000009
format[0]: 0x000014
format[1]: 00000000
format Name: S16_LE, U16_LE
Subformat: 0x000001
Rate: min=8000Hz max=16000Hz
Channels: min=2 max=2
Sample bits: min=16 max=16
Period size: min=256 max=1024
Period count: min=4 max=64
simply, changing ‘usb_config.format’ in ‘runsco()’ will work?
Trying to figure out what to do…However, tinycap on BT card works fine, I could get audio.
Please help.
Thanking you,
Regards,
Arnab Dey