Khadas Tone Board for VIMs


#143

Yep, you are right, only USB signals are required for Tone Board.


#144

As you expect, we did considered the balanced output and various kinds of impedance headphone supported in next version.

:grinning::grinning:


#145

Hi, here are the results…

khadas@KhadasVim1proRaxy:~$ lsusb
Bus 002 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub
Bus 001 Device 003: ID 20b1:0008 XMOS Ltd 
Bus 001 Device 002: ID 1a40:0801 Terminus Technology Inc. 
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
khadas@KhadasVim1proRaxy:~$ uname -a
Linux KhadasVim1proRaxy 4.9.40 #2 SMP PREEMPT Sun Jun 10 01:07:25 CEST 2018 aarch64 aarch64 aarch64 GNU/Linux
khadas@KhadasVim1proRaxy:~$ lsb_release -a
No LSB modules are available.
Distributor ID: Ubuntu
Description:    Ubuntu 16.04.4 LTS
Release:        16.04
Codename:       xenial
khadas@KhadasVim1proRaxy:~$ cat /proc/asound/cards
 0 [AMLMESONAUDIO  ]: AML-MESONAUDIO - AML-MESONAUDIO
                      AML-MESONAUDIO
 1 [x20            ]: USB-Audio - xCORE USB Audio 2.0
                      XMOS xCORE USB Audio 2.0 at usb-xhci-hcd.0.auto-1.4, high speed

I hope everything is correct .
tks

EDIT;
I learned how to test sound output on alsa level :
get some wav sample from the net
wget http://www.freespecialeffects.co.uk/soundfx/sirens/police_s.wav

khadas@KhadasVim1proRaxy:~$ aplay -L
null
    Discard all samples (playback) or generate zero samples (capture)
default:CARD=AMLMESONAUDIO
    AML-MESONAUDIO, 
    Default Audio Device
sysdefault:CARD=AMLMESONAUDIO
    AML-MESONAUDIO, 
    Default Audio Device
dmix:CARD=AMLMESONAUDIO,DEV=0
    AML-MESONAUDIO, 
    Direct sample mixing device
dmix:CARD=AMLMESONAUDIO,DEV=1
    AML-MESONAUDIO, 
    Direct sample mixing device
dmix:CARD=AMLMESONAUDIO,DEV=2
    AML-MESONAUDIO, 
    Direct sample mixing device
dsnoop:CARD=AMLMESONAUDIO,DEV=0
    AML-MESONAUDIO, 
    Direct sample snooping device
dsnoop:CARD=AMLMESONAUDIO,DEV=1
    AML-MESONAUDIO, 
    Direct sample snooping device
dsnoop:CARD=AMLMESONAUDIO,DEV=2
    AML-MESONAUDIO, 
    Direct sample snooping device
hw:CARD=AMLMESONAUDIO,DEV=0
    AML-MESONAUDIO, 
    Direct hardware device without any conversions
hw:CARD=AMLMESONAUDIO,DEV=1
    AML-MESONAUDIO, 
    Direct hardware device without any conversions
hw:CARD=AMLMESONAUDIO,DEV=2
    AML-MESONAUDIO, 
    Direct hardware device without any conversions
plughw:CARD=AMLMESONAUDIO,DEV=0
    AML-MESONAUDIO, 
    Hardware device with all software conversions
plughw:CARD=AMLMESONAUDIO,DEV=1
    AML-MESONAUDIO, 
    Hardware device with all software conversions
plughw:CARD=AMLMESONAUDIO,DEV=2
    AML-MESONAUDIO, 
    Hardware device with all software conversions
default:CARD=x20
    xCORE USB Audio 2.0, USB Audio
    Default Audio Device
sysdefault:CARD=x20
    xCORE USB Audio 2.0, USB Audio
    Default Audio Device
front:CARD=x20,DEV=0
    xCORE USB Audio 2.0, USB Audio
    Front speakers
surround21:CARD=x20,DEV=0
    xCORE USB Audio 2.0, USB Audio
    2.1 Surround output to Front and Subwoofer speakers
surround40:CARD=x20,DEV=0
    xCORE USB Audio 2.0, USB Audio
    4.0 Surround output to Front and Rear speakers
surround41:CARD=x20,DEV=0
    xCORE USB Audio 2.0, USB Audio
    4.1 Surround output to Front, Rear and Subwoofer speakers
surround50:CARD=x20,DEV=0
    xCORE USB Audio 2.0, USB Audio
    5.0 Surround output to Front, Center and Rear speakers
surround51:CARD=x20,DEV=0
    xCORE USB Audio 2.0, USB Audio
    5.1 Surround output to Front, Center, Rear and Subwoofer speakers
surround71:CARD=x20,DEV=0
    xCORE USB Audio 2.0, USB Audio
    7.1 Surround output to Front, Center, Side, Rear and Woofer speakers
iec958:CARD=x20,DEV=0
    xCORE USB Audio 2.0, USB Audio
    IEC958 (S/PDIF) Digital Audio Output
dmix:CARD=x20,DEV=0
    xCORE USB Audio 2.0, USB Audio
    Direct sample mixing device
dsnoop:CARD=x20,DEV=0
    xCORE USB Audio 2.0, USB Audio
    Direct sample snooping device
hw:CARD=x20,DEV=0
    xCORE USB Audio 2.0, USB Audio
    Direct hardware device without any conversions
plughw:CARD=x20,DEV=0
    xCORE USB Audio 2.0, USB Audio
    Hardware device with all software conversions

force usage of x20 toneboard and let aplay do its trick…

khadas@KhadasVim1proRaxy:~$ aplay -D plughw:CARD=x20,DEV=0 police_s.wav                                                
Playing WAVE 'police_s.wav' : Unsigned 8 bit, Rate 22000 Hz, Mono

SUCCESS ! :heart_eyes:
I can hear sound coming out of my speakers,
this is my audio synoptics :
wav file --> aplay --> alsa --> USB-A socket --> USB-C cable --> khadas toneboard --> analog out --> rca cable --> aux input of my audio amp --> stereo speakers :oncoming_police_car:

Now testing mp3 playback…
need to use sox, as aplay unable to play anything but wav files;

sudo apt install sox
sudo apt-get install libsox-fmt-all
wget http://www.freespecialeffects.co.uk/soundfx/household/bubbling_water_1.mp3
khadas@KhadasVim1proRaxy:~$ AUDIODEV=plughw:CARD=x20,DEV=0 play bubbling_water_1.mp3

bubbling_water_1.mp3:

 File Size: 243k      Bit Rate: 128k
  Encoding: MPEG audio    Info: 2000
  Channels: 2 @ 16-bit   
Samplerate: 44100Hz      Album: Demo
Replaygain: off         Artist: the hollywood edge
  Duration: 00:00:15.16  

In:100%  00:00:15.15 [00:00:00.01] Out:668k  [      |      ]        Clip:0    
Done.

and it plays thru my speakers again, :hugs: as expected.


#146

Here is some hires flac file from sony to test the toneboard
http://helpguide.sony.net/high-res/sample1/v1/en/index.html
http://helpguide.sony.net/high-res/sample1/v1/data/Sample_BeeMoved_96kHz24bit.flac.zip

unzip and play the resulting flac file:

khadas@KhadasVim1proRaxy:~$ play Sample_BeeMoved_96kHz24bit.flac

Sample_BeeMoved_96kHz24bit.flac:

File Size: 16.7M Bit Rate: 3.34M
Encoding: FLAC
Channels: 2 @ 24-bit
Samplerate: 96000Hz Album: Bee Moved
Replaygain: off Artist: Blue Monday FM
Duration: 00:00:39.88 Title: Bee Moved

In:24.6% 00:00:09.81 [00:00:30.06] Out:942k [!=====|=====!] Hd:0.0 Clip:0
Aborted.

but I’m not so sure that ubuntu sends 24/96 data to the toneboard…
can anywone confirm ?
tks


#147

Hey Gouwa, hey Stefan,
I’ve try to connect only the usb DP/DM signal (gpio pin 3/4 or 7/8 ) from the vim to the tone board and use an dedicated PSU, but i can’t get any signal.
What do I wrong ?
Thanks for help
Sebastian


#148

Which version ROM you installed on your VIM device?

You might intersteing in:


#149

Close this topic, so we can create different topics and make it readable.

Have fun!


#150