[Solved] USB sound card

Post Reply
bfontaine
Posts: 5
Joined: Wed Jan 09, 2019 3:11 pm
4kOpen Owner: Yes
[Solved] USB sound card

Post by bfontaine » Wed Mar 13, 2019 2:17 pm

Hi,

I want to use an USB sound card.
I can see it with lsusb, it's a C-Media device, but I can't see it in PulseAudio control.

Thank you
Last edited by bfontaine on Wed Jul 03, 2019 2:43 pm, edited 1 time in total.

User avatar
attie
Posts: 23
Joined: Thu May 17, 2018 11:40 am
4kOpen Owner: Yes
Re: USB sound card

Post by attie » Thu Mar 14, 2019 4:56 pm

Hello bfontaine,

Can you share the device's VID and PID? lsusb should be able to tell you this information.
Do you see anything related in dmesg or while booting?
Do you know if the device is supported on Linux? can you try it with a Linux PC?

Attie

bfontaine
Posts: 5
Joined: Wed Jan 09, 2019 3:11 pm
4kOpen Owner: Yes
Re: USB sound card

Post by bfontaine » Wed Apr 17, 2019 3:30 pm

Hi,

The device is working on my xubuntu 18.04.

Here my lsusb output :

Code: Select all

Bus 004 Device 003: ID 046d:c534 Logitech, Inc. Unifying Receiver
Bus 004 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 003 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 002 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 001 Device 003: ID 0d8c:000c C-Media Electronics, Inc. Audio Adapter
Bus 001 Device 002: ID 1a40:0101 Terminus Technology Inc. Hub
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 006 Device 002: I[D 0781:5590 SanDisk Corp. 
Bus 006 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub
Bus 005 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
And dmesg output:

Code: Select all

[603842.069203] usb 1-1.3: USB disconnect, device number 3
[603845.144468] usb 1-1.3: new full-speed USB device number 4 using ehci-platform
[603845.277442] input: C-Media USB Headphone Set   as /devices/soc.14/9a03c00.usb/ehci-platform.0/usb1/1-1/1-1.3/1-1.3:1.3/input/input8
[603845.277809] hid-generic 0003:0D8C:000C.0006: input: USB HID v1.00 Device [C-Media USB Headphone Set  ] on usb-ehci-platform.0-1.3/input3
Thanks,

Bertrand

MattMunro
Posts: 13
Joined: Mon Oct 08, 2018 10:49 am
4kOpen Owner: Yes
Re: USB sound card

Post by MattMunro » Wed Apr 17, 2019 3:55 pm

Hi,
To enable this you simply need to enable CONFIG_INPUT_CM109 kernel config.
Do you know how to do this or do you need more help?
Thanks,
Matt

bfontaine
Posts: 5
Joined: Wed Jan 09, 2019 3:11 pm
4kOpen Owner: Yes
Re: USB sound card

Post by bfontaine » Wed Apr 24, 2019 1:22 pm

Hi,

I have absolutely no idea how to change kernel config, help welcome.

Thanks,
Bertrand

bfontaine
Posts: 5
Joined: Wed Jan 09, 2019 3:11 pm
4kOpen Owner: Yes
Re: USB sound card

Post by bfontaine » Wed Apr 24, 2019 1:50 pm

Hi,

I finally found how to get .config :

Code: Select all

zcat /proc/config.gz > /root/.config
Do I need to completely recompile the kernel?

MattMunro
Posts: 13
Joined: Mon Oct 08, 2018 10:49 am
4kOpen Owner: Yes
Re: USB sound card

Post by MattMunro » Fri Apr 26, 2019 9:45 am

Hi,
You will though it is quite simple to do, to recompile it for Raspbian you will need to loosely follow the Starkl guide present on the wiki though all the required steps are listed below. Please ask if you need clarification on a step:

This guide presumes the use of a Linux machine, however it should also work on mac and windows so long as you use docker, though the commands to setup docker may be incorrect.

The first step is that you will need to download the non-licensed content from bitbucket (https://bitbucket.org/4kopen/starkl/src/master/) and the licensed content from the software page (https://www.4kopen.com/software) , and once downloaded change to the raspbian branch:

Code: Select all

git clone https://bitbucket.org/4kopen/starkl.git
git checkout raspbian
After you have done this, edit ${starkl}/menuconfig/linux-defconfig.m4 and simply append the following line to the end of it:

Code: Select all

CONFIG_INPUT_CM109=m
After this, you will either need to setup docker or install a lot of requirements, I suggest following "setting up docker" on the wiki (https://www.4kopen.com/wiki/quick-start/starkl), however "Without Docker (Not Recommended)" should also work.

Next you want to run either of the following depending on if you are building with Docker or not.

Code: Select all

docker run --cap-add=SYS_PTRACE --privileged=true -e TARGET=starkl-b2264-raspbian -it --rm -v "$(pwd)":/starkl 4kopen/starkl-builder

Code: Select all

make outputs/starkl-b2264/images/
Finally, copy the following cm109.ko binary from your build directory:

Code: Select all

./outputs/starkl-b2264-raspbian/buildroot/build/linux-3.10.92/drivers/input/misc/cm109.ko
To your rootfs on the device at:

Code: Select all

/lib/modules/4.14.79+/kernel/drivers/input/misc/cm109.ko

bfontaine
Posts: 5
Joined: Wed Jan 09, 2019 3:11 pm
4kOpen Owner: Yes
Re: USB sound card

Post by bfontaine » Wed Jul 03, 2019 2:43 pm

Hi,

I finally got the output showing in aplay -l
I had to compile and add "snd-usb-audio.ko" module and its dependancies.

Thank you very much for help.


Post Reply