Starting my zynthian build: alternative LCD, DAC, encoders

new log with more informations

root@zynthian:~# systemctl status zynthian.service -l
● zynthian.service - Zynthian User Interface
Loaded: loaded (/etc/systemd/system/zynthian.service; enabled)
Active: active (running) since Fri 2018-05-11 14:23:22 BST; 4min 14s ago
Main PID: 485 (startx)
CGroup: /system.slice/zynthian.service
├─ 485 /bin/sh /usr/bin/startx ./zynthian.sh – :0 vt3
├─ 562 xinit ./zynthian.sh – /usr/bin/X :0 vt3 -auth /tmp/serverauth.lYzsg6n9MY
├─ 563 /usr/lib/xorg/Xorg :0 vt3 -auth /tmp/serverauth.lYzsg6n9MY
├─ 575 /bin/bash ./zynthian.sh
└─1953 /usr/bin/python3 ./zynthian_gui.py

May 11 14:27:33 zynthian startx[485]: ALSA lib pcm_hw.c:1667:(_snd_pcm_hw_open) Invalid value for card
May 11 14:27:33 zynthian startx[485]: ALSA: Cannot open PCM device alsa_pcm for playback. Falling back to capture-only mode
May 11 14:27:33 zynthian startx[485]: JackTemporaryException : now quits…
May 11 14:27:33 zynthian startx[485]: Cannot initialize driver
May 11 14:27:33 zynthian startx[485]: JackServer::Open failed with -1
May 11 14:27:33 zynthian startx[485]: Failed to open server
May 11 14:27:34 zynthian startx[485]: Cannot connect to server socket err = No such file or directory
May 11 14:27:34 zynthian startx[485]: Cannot connect to server request channel
May 11 14:27:35 zynthian startx[485]: Cannot connect to server socket err = No such file or directory
May 11 14:27:35 zynthian startx[485]: Cannot connect to server request channel
root@zynthian:~# root@zynthian:~# systemctl status zynthian.service -l
Loaded: loaded (/etc/systemd/system/zynthian.service; enabled)
Active: active (running) since Fri 2018-05-11 14:23:22 BST; 4min 14s ago
Main PID: 485 (startx)
CGroup: /system.slice/zynthian.service
├─ 485 /bin/sh /usr/bin/startx ./zynthian.sh – :0 vt3
├─ 562 xinit ./zynthian.sh – /usr/bin/X :0 vt3 -auth /tmp/serverauth.lYzsg6n9MY
├─ 563 /usr/lib/xorg/Xorg :0 vt3 -auth /tmp/serverauth.lYzsg6n9MY
├─ 575 /bin/bash ./zynthian.sh-bash: root@zynthian:~#: command not found

       └─1953 /usr/bin/python3 ./zynthian_gui.py

May 11 14:27:33 zynthian startx[485]: ALSA lib pcm_hw.c:1667:(_snd_pcm_hw_open) Invalid value for card
May 11 14:27:33 zynthian startx[485]: ALSA: Cannot open PCM device alsa_pcm for playback. Falling back to capture-only mode
May 11 14:27:33 zynthian startx[485]: JackTemporaryException : now quits…
May 11 14:27:33 zynthian startx[485]: Cannot initialize driver
May 11 14:27:33 zynthian startx[485]: JackServer::Open failed with -1
May 11 14:27:33 zynthian startx[485]: Failed to open server
May 11 14:27:34 zynthian startx[485]: Cannot connect to server socket err = No such file or directory
May 11 14:27:34 zynthian startx[485]: Cannot connect to server request channel
May 11 14:27:35 zynthian startx[485]: Cannot connect to server socket err = No such file or directory
May 11 14:27:35 zynthian startx[485]: Cannot connect to server request channel
root@zynthian:~#root@zynthian:~# ● zynthian.service - Zynthian User Interface
-bash: ●: command not found
root@zynthian:~# Loaded: loaded (/etc/systemd/system/zynthian.service; enabled)
-bash: syntax error near unexpected token (' root@zynthian:~# Active: active (running) since Fri 2018-05-11 14:23:22 BST; 4min 14s ago -bash: syntax error near unexpected token(’
root@zynthian:~# Main PID: 485 (startx)
-bash: syntax error near unexpected token (' root@zynthian:~# CGroup: /system.slice/zynthian.service -bash: CGroup:: command not found root@zynthian:~# ├─ 485 /bin/sh /usr/bin/startx ./zynthian.sh -- :0 vt3 -bash: ├─: command not found root@zynthian:~# ├─ 562 xinit ./zynthian.sh -- /usr/bin/X :0 vt3 -auth /tmp/serverauth.lYzsg6n9MY -bash: ├─: command not found root@zynthian:~# ├─ 563 /usr/lib/xorg/Xorg :0 vt3 -auth /tmp/serverauth.lYzsg6n9MY -bash: ├─: command not found root@zynthian:~# ├─ 575 /bin/bash ./zynthian.sh -bash: ├─: command not found root@zynthian:~# └─1953 /usr/bin/python3 ./zynthian_gui.py -bash: └─1953: command not found root@zynthian:~# root@zynthian:~# May 11 14:27:33 zynthian startx[485]: ALSA lib pcm_hw.c:1667:(_snd_pcm_hw_open) Invalid value for card -bash: syntax error near unexpected token(’
root@zynthian:~# May 11 14:27:33 zynthian startx[485]: ALSA: Cannot open PCM device alsa_pcm for playback. Falling back to capture-only mode
-bash: May: command not found
root@zynthian:~# May 11 14:27:33 zynthian startx[485]: JackTemporaryException : now quits…
-bash: May: command not found
root@zynthian:~# May 11 14:27:33 zynthian startx[485]: Cannot initialize driver
-bash: May: command not found
root@zynthian:~# May 11 14:27:33 zynthian startx[485]: JackServer::Open failed with -1
-bash: May: command not found
root@zynthian:~# May 11 14:27:33 zynthian startx[485]: Failed to open server
-bash: May: command not found
root@zynthian:~# May 11 14:27:34 zynthian startx[485]: Cannot connect to server socket err = No such file or directory
-bash: May: command not found
root@zynthian:~# May 11 14:27:34 zynthian startx[485]: Cannot connect to server request channel
-bash: May: command not found
root@zynthian:~# May 11 14:27:35 zynthian startx[485]: Cannot connect to server socket err = No such file or directory
-bash: May: command not found
root@zynthian:~# May 11 14:27:35 zynthian startx[485]: Cannot connect to server request channel
-bash: May: command not found
root@zynthian:~# root@zynthian:~#

I’ve listed alsa devices (aplay -l command), and got the USB Audio card devices (both UCA-222 and C-Media) but Jack can’t started… Work with alsa, but doesn’t with jack… I’ll continue my investigations =)

With speaker-test from alsa, I get audio response with a cheap CM108 USB DAC, but keep stuck on zynthian error screen :frowning:

1 Like

Keep this up it’s good stuff!
It might of got a bit of attention from me today but I was busy changing a pump in my solar heating system . . . :frowning:

I’m almost giving up of the USB DAC config. It’s so hard to me to make anything with linux.

But while my AudioInjector DAC doesn’t arrive, I’ll keep buying others parts to my project. Today arrived the MCP23017 module to wire with the KY040 encoders. This is the my new challenge: To get this working with the raspberry board.

PS: I’m using the same encoder modules of this project:

I can understand the linux reticence. It’s not like computing most people are taught.

I have heard hell described as linux without manuals. . . .but. . .
IT works. it really does.
The fact that there are at least 30 ways of doing anything and any search for information reveals much out of date, information.

The danger is to blindly apply instructions from the web because context is everything, and to look at quite what it manages is the real achievement.

If you are Windows or Mac you have massive degrees of control of many aspects of the system, whilst in linux people work round such limitations.

Command line really is the most effective way of providing access to a computer guts, remember that both Mac & Windows tried to dispense with the command line and have re-implemented it.

Read error messages VERY carefully. There is often the information you require in their if you look hard.

Jack & Alsa confuse Linux audio but the gestation period for other systems was equally complicated.

Please keep trying, it does do stuff just probably not in the way you expect.

Sorry this is a bit vague but it really is worth the effort.
IT has been said that one can only change at a rate one can’t perceive, so it will always feel frustrating in some regard, it’s just you will find that things do get easier the more effort you put in, and that is the true value of open source, you get back what you put in.

… Anyone got another cheat sheet of git commands …?

A little update on my build process: I buyed a cheap PCM5102A DAC and it will arrive today (my wish). In few days I’ll start the firsts tests, just for to prototype my custom functionalities (midi controller surface with arduino). The “final” version will be with AudioInjector DAC.

In other words, I’ved give up of to make the USB DAC to work with zynthian.

1 Like

a new and happy update: the AudioInjector too will to arrive today!

2 Likes

Today I mounted the raspberry pi with audioinjector DAC and my LCD Waveshare 3.5 (A) but without encoders with MCP23017 (because I will build the encoders interface). But I have a few questions:

The touch interface work without the encoders?

UPDATE:
I’ve changed the LCD configuration to piscreen 3.5 (v2) at the web interface and got touch working. Probably my waveshare 3.5A is fake. Anyway, all now works as expected. Tomorrow I’ll test with a midi controller and try to build the MCP23017 interface. At last, I’ll try to find a ribbon cable to detache the LCD from audioinjector GPIO. When I get a fully funcional zynthian box, I’ll to design the enclosure and all conection position (midi in/out audio inputs and outputs).

1 Like

Hey @mheidt, @wyleu (and all users :slight_smile:), can you help me with this doubt?

What is the best way to put the encoders with MCP23017 and MIDI IN / OUT / THRU with this mounting (see the photo posted previously)? Do you exist any way? Or I’ll have to buy / mount the BUS cable ribbon?

I am thinking in to change my LCD to a 5" HDMI model to make the “periferal” conections more simple. The zynthian supports touch over USB?

I have remembered too this thread with my question (Alternatives to ribbon bus cable?). It’s a good way?

1 Like

I am not sure if all 3 midi ports are possible with v1. With the AllInOne board, it’s just plug and play.
I just bought a WaveShare 5 HDMI and it worked out of the box…I just switched it in the webconf and even touch worked. But check the model. The H version is the one I took.

2 Likes

I am with two issues, and have tryed so many ways to solve them but without success. The first, is the inverted X axis with my LCD touch. The second: I cannot got audio with my audioinjector. On this moment, I’m downloading a new raspbian image and will to test the DAC on a fresh system, because I suspect if my my unit have some problem.

On my last reply, I told that my touchscreen was working, but when I activated the cursor at the webconfig, I realized the X axis inverted.

I’ve tryed too configure the LCD as CUSTOM config, but without sucess. When I use the xinput-calibrator, the touch orientation works perfectly, recognizing the four points, but when I’ve updated the 99-calibration.conf with calibrator output, got no success.

UPDATE: With pure raspbian, the audioinjector worked like a charm. In the same raspbian OS, I’ve installed the driver from waveshare tutorial https://www.waveshare.com/wiki/3.5inch_RPi_LCD_(A) and got the touch working without problems too.

So, why the official waveshare 3.5A driver worked with my LCD perfectly with raspbian and doesn’t worked with zynthian system? I compared the two files waveshare35a-overlay.dtb of the zynthian project and waveshare driver and they are the same (binary same).

And why I’m not got audio with the audioinjector (Audioinjector Stereo)? When I test the “Audio test” on zynthian UI interface, I get a message with a wav path and when I touch again, a red error message apears quickly and back to system screen: “Error: b’Registered as JACK client prevent the lastbits of audio to vanish out o 2.5/2.5 Audio Player for Layer…”.

This is probably not helpful but I also have a Waveshare 3.5A clone and AudioInjector and All In One board. Everything works except touch in Zynthian. I’m not very experienced with Linux sadly, but I grew up using MS-DOS commnd line and Windows 3.1 so bash doesn’t scare me :grinning:

In Raspian I was able to get both the Touch feature and AudioInjector to work. But I think this was without the All In One board. Sorry I’m probably repeating myself again on this forum.

In my case, I’m using just audioinjector stereo and LCD Waveshare 3.5A. All worked perfectly on raspbian. Now I have the touch working, but with X axis inverted.

I have a good update: have flashed with the Zynthian Gorgona, updated it, and installed the audioinjector .deb package, following the instructions from https://github.com/Audio-Injector/stereo-and-zero:

  1. wget https://github.com/Audio-Injector/stereo-and-zero/raw/master/audio.injector.scripts_0.1-1_all.deb
  2. sudo dpkg -i audio.injector.scripts_0.1-1_all.deb
  3. audioInjector-setup.sh
  4. reboot
  5. alsactl --file /usr/share/doc/audioInjector/asound.state.RCA.thru.test restore
  6. reboot

Now I know how to download a file from terminal, install a .deb package and run a script hahahahaha

And voilá! Got my mojo working

And have tested with a usb midi controller =)

3 Likes

With the @rod_amaral help, I finally got sucess on LCD configuration (and how to disable the built-in mic from audioinjector).

To disable the audioinjector microphone, I’ve followed these steps:

  1. alsamixer
  2. F5
  3. Navigate to MIC Option and press space.

To enable the audioinjector RCA inputs, I follow these steps:

  1. alsamixer
  2. F5
  3. Enable L/R CAPTURE to LINE and change INPUT Mux to Line In.

To configure the touchscreen, I’ve followed these steps:

  1. apt-get install -y xinput-calibrator (to download/install the touchscreen calibrator)
  2. Create a file calibrate.sh with the content:
    #!/bin/sh
    xinput_calibrator -v
  3. chmod +x calibrate.sh (to make it executable)
  4. systemctl stop zynthian (stop zynthian)
  5. startx ./calibrate.sh (start the calibrator)
  6. Touch the four points on the screen
  7. Update the 99-calibration.conf with the result of calibrator run
    Section “InputClass”
    Identifier “calibration”
    MatchProduct “ADS7846 Touchscreen”
    Option “MinX” “3868”
    Option “MaxX” “63578”
    Option “MinY” “61610”
    Option “MaxY” “2901”
    Option “SwapXY” “0” # unless it was already set to 1
    Option “InvertX” “0” # unless it was already set
    Option “InvertY” “0” # unless it was already set
    Option “TransformationMatrix” “-1 0 1 0 1 0 0 0 1”
    EndSection

At end, I’ve changed the LCD to PiScreen 3.5 V1 on the webconf.

So, at now, all hardware I have was configurated.

Next steps:

  1. build the MCP23017 board to use my zynthian with encoders (I’m considering to buy the all-in-one board from zynthian shop (with the bus cable). Will it work with audioinjector?
  2. build the midi in/out/thru board
  3. build the enclosure
  4. Enjoy zynthian with the new partner behringer motor 61
  5. Buy pianoteq
3 Likes

That MOTÖR-61 looks like the new official Midi controller in my mind at least ( techno lust rating medium.).

could we cover it with MIDI mapping?

Doesn’t look too good . . .

But apparently the firmware update fixes this stuff . . .

Be good to see a video with the new firmware.
@jonathaslacerda
Have you got one yet?

I’ve bought my MOTÖR-61 it last wednesday, but just will arrive on 07/31. Course we can to map it! When arrive, I’ll upgrade the firmware and test it

I’m considering to buy the all-in-one (v2) board from zynthian shop (with the bus cable). Will it work with audioinjector?

Audioinjector doesn’t need rewiring.

2 Likes