wiki/content/note/bonemedia.md
2017-03-13 21:03:07 +01:00

109 lines
3.1 KiB
Markdown

+++
date = 2012-03-02T00:00:00+00:00
title = "BeagleBone playing media"
tags = ["embedded"]
+++
I have a XITEL MD-PORT AN1 USB Audio adapter. It sounds quite good. Can
I hook it to my BeagleBone and use it as a remote audio player?
On Precise I
see:
[33777.196130] usb 6-2: new full-speed USB device number 6 using uhci_hcd
[33777.475281] input: XITEL MD-PORT AN1 as \
/devices/pci0000:00/0000:00:1d.0/usb6/6-2/6-2:1.2/input/input17
[33777.475522] generic-usb 0003:09EF:0101.0006: input,hidraw0: \
USB HID v1.00 Device [XITEL MD-PORT AN1] on usb-0000:00:1d.0-2/input2
The new nodes under /dev are:
- /dev/bus/usb/006/006
- /dev/char/116:7
- /dev/char/116:8
- /dev/char/13:68
- /dev/char/189:645
- /dev/char/250:0
- /dev/hidraw0
- /dev/input/by-id/usb-XITEL\_MD-PORT\_AN1\_XA292-event-if02
- /dev/input/by-path/pci-0000:00:1d.0-usb-0:2:1.2-event
- /dev/input/event4
- /dev/snd/by-id
- /dev/snd/by-id/usb-XITEL\_MD-PORT\_AN1\_XA292-00
- /dev/snd/by-path/pci-0000:00:1d.0-usb-0:2:1.0
- /dev/snd/controlC1
- /dev/snd/pcmC1D0p
- /dev/vboxusb/006/006
The new input device is interesting. Windows automatically changes to
the port when a headphone jack is plugged in - I wonder if the input
fires on insert/remove?
On the bone I see:
- /dev/bus/usb/001/002
- /dev/char/116:0
- /dev/char/116:16
- /dev/char/13:64
- /dev/char/189:1
- /dev/input/by-id
- /dev/input/by-id/usb-XITEL\_MD-PORT\_AN1\_XA292-event-if02
- /dev/input/by-path
- /dev/input/by-path/platform-musb-hdrc.1-usb-0:1:1.2-event
- /dev/input/event0
- /dev/snd/by-id
- /dev/snd/by-id/usb-XITEL\_MD-PORT\_AN1\_XA292-00
- /dev/snd/by-path
- /dev/snd/by-path/platform-musb-hdrc.1-usb-0:1:1.0
- /dev/snd/controlC0
- /dev/snd/pcmC0D0p
- /dev/usbdev1.2
So that's good\!
Use mpg321 and madplay as tests. Using Linaro, so `apt-get install`
them. Need alsa-utils for the Alsa support.
Audio is terrible - choppy. kworker/0:1 sits at 95 % CPU. Can't set
snd-usb-audio nrpacks as it's compiled in.
0006-usb-musb-cppi41\_dma-Check-if-scheduling-is-required-.patch may fix
this. Build Angstrom and see.
Still fails with
uImage-3.1-r2l+gitr1d84d8853fa30cf3db2571a5aec572accca4e29d-beaglebone-20120127084313.bin.
Try PIO only? Might be that the patch works fine for high speed devices
but spends too much time spinning on others.
## New kernel
It's a confusing OpenEmbedded recipe based setup.
Kernel is at git://arago-project.org/git/projects/linux-am33x.git
meta-ti layer is at
git://git.angstrom-distribution.org/meta-texasinstruments
The recipe is
[linux-ti33x-psp\_3.2](http://git.angstrom-distribution.org/cgi-bin/cgit.cgi/meta-texasinstruments/tree/recipes-kernel/linux/linux-ti33x-psp_3.2.bb)
and will be out of date when you read this :)
The config is under
recipes-kernel/linux/linux-ti33x-psp-3.2/beaglebone/defconfig.
There's a large patch list on top of the kernel. I hacked a script to
apply the patches on top of the Git tree.
Install the modules using `make modules_install
INSTALL_MOD_PATH=/media/rootfs`
## Playback
vlc looks viable. Run against local files and use a/any VLC remote to
control.
DNLA seems pretty dire.