# Hotplug USB audio

**URL:** <https://discourse.zynthian.org/t/hotplug-usb-audio/10544>\
**Category:** Using Zynthian\
**Created:** [November 20, 2024, 5:25pm UTC](https://discourse.zynthian.org/t/hotplug-usb-audio/10544 "2024-11-20T17:25:14Z")\
**Posts on this page:** 20\
**Page:** 1

<div class="post-metadata">

**Author:** ![riban](https://discourse.zynthian.org/user_avatar/discourse.zynthian.org/riban/32/2331_2.png) [@riban](https://discourse.zynthian.org/u/riban)\
**Post date:** [November 20, 2024, 5:25pm UTC](https://discourse.zynthian.org/t/hotplug-usb-audio/10544/1 "2024-11-20T17:25:14Z")

</div>

I have just pushed some fixes to the dev branch. Anyone wanting to test it out can do so. It _should_ be fairly stable and functional but you play at your own risk. You can basically add and remove USB audio interfaces and they should appear and disappear in the audio input and output routing menus. Hotplug can be enabled/disabled in the admin menu.

---

<div class="post-metadata">

**Author:** ![wyleu](https://discourse.zynthian.org/user_avatar/discourse.zynthian.org/wyleu/32/514_2.png) [@wyleu](https://discourse.zynthian.org/u/wyleu)\
**Post date:** [November 20, 2024, 7:20pm UTC](https://discourse.zynthian.org/t/hotplug-usb-audio/10544/2 "2024-11-20T19:20:06Z")

</div>

Well that was easy…

 ![IMG_20241120_181528](https://discourse.zynthian.org/uploads/default/original/2X/e/eef8a121fbf87b68440ab965cf1ba2da1de7b7a6.jpeg)

 ![hot-plug-audio](https://discourse.zynthian.org/uploads/default/original/2X/c/c55be1bdd3f0e0333a6fbc98dcb0215d6f19f539.png)

1/ Update switch zynthian-ui to Feature/hotplug\_hotplug and save  
2/ Reboot  
3/ Turn on Hotplug USB Audio  
4/ Plugin USB to 14" jack lead  
5/ Add audio 3 as an Audio input.

 ![audio3input](https://discourse.zynthian.org/uploads/default/original/2X/3/30935a48684b9c95c349405f66c029686ddcb74a.png)

The pedalboard now has a third audio input!!

 ![third-input](https://discourse.zynthian.org/uploads/default/original/2X/4/4a029d2f559a8e1a01f5c87083041c90459d8703.png)

**This is a BIG development!**

---

<div class="post-metadata">

**Author:** ![riban](https://discourse.zynthian.org/user_avatar/discourse.zynthian.org/riban/32/2331_2.png) [@riban](https://discourse.zynthian.org/u/riban)\
**Post date:** [November 20, 2024, 9:51pm UTC](https://discourse.zynthian.org/t/hotplug-usb-audio/10544/3 "2024-11-20T21:51:11Z")

</div>

Detection of plug/unplug is a bit slow. I will look at that later in the week.

---

<div class="post-metadata">

**Author:** ![maartmaart](https://discourse.zynthian.org/user_avatar/discourse.zynthian.org/maartmaart/32/12972_2.png) [@maartmaart](https://discourse.zynthian.org/u/maartmaart)\
**Post date:** [November 21, 2024, 2:50pm UTC](https://discourse.zynthian.org/t/hotplug-usb-audio/10544/4 "2024-11-21T14:50:35Z")

</div>

Hi @wyleu ,

How do you ‘Update switch zynthian-ui to Feature/hotplug\_hotplug’  
I cannot select this ‘Feature/hotplug\_hotplug’ in Webconf… (On github I see it)  
I am on valngelis…

Or… how do I merge repositories so I can have the Wanthalf on screen buttons and the Riban usb audio automount…

Cheers,  
Maarten

---

<div class="post-metadata">

**Author:** ![riban](https://discourse.zynthian.org/user_avatar/discourse.zynthian.org/riban/32/2331_2.png) [@riban](https://discourse.zynthian.org/u/riban)\
**Post date:** [November 21, 2024, 2:55pm UTC](https://discourse.zynthian.org/t/hotplug-usb-audio/10544/5 "2024-11-21T14:55:50Z")

</div>

> [@maartmaart](#):
>
> Or… how do I merge repositories so I can have the Wanthalf on screen buttons and the Riban usb audio automount…

You can’t (easily) do that. When hotplug audio gets merged to vangelis then @wanthalf _may_ merge it into his dev version.

You can test the dev version by:

- Accessing webconf in browser
- Select SOFTWARE-\>Repositories.
- Enable “Advanced view”.
- Select “Custom” version.
- Select “Feature/Hotplug\_audio” for zynthian-ui.
- Save.
- Update.
- Reboot.
- Pray!
- Enjoy!
- Report progress here.

---

<div class="post-metadata">

**Author:** ![wyleu](https://discourse.zynthian.org/user_avatar/discourse.zynthian.org/wyleu/32/514_2.png) [@wyleu](https://discourse.zynthian.org/u/wyleu)\
**Post date:** [November 21, 2024, 2:55pm UTC](https://discourse.zynthian.org/t/hotplug-usb-audio/10544/6 "2024-11-21T14:55:52Z")

</div>

It’s in webconf → software-repositories.

 ![webconf-repositories](https://discourse.zynthian.org/uploads/default/original/2X/b/bdf5f597050ca4b08b13c6a32024e5bbe83c0071.png)

select save and then reboot.

I always find it sensible to check on the webconf front screen that it’s actually loaded it first on the restart. It’s not that it’s unreliable, but you want to be sure you have the correct version before playing with a new feature.  
A remember this is development code. You are making your own rook soup from here ! But it appears pretty stable so far.

---

<div class="post-metadata">

**Author:** ![maartmaart](https://discourse.zynthian.org/user_avatar/discourse.zynthian.org/maartmaart/32/12972_2.png) [@maartmaart](https://discourse.zynthian.org/u/maartmaart)\
**Post date:** [November 21, 2024, 2:59pm UTC](https://discourse.zynthian.org/t/hotplug-usb-audio/10544/7 "2024-11-21T14:59:20Z")

</div>

Thanks guys 🙂 Such a fast response…

This is what I get: (No “Feature/Hotplug\_audio”)

 ![image](https://discourse.zynthian.org/uploads/default/original/2X/0/0a2fc4c88fa9c8004a1b42a84d16b41efeec1847.png)

Cheers,  
Maarten

---

<div class="post-metadata">

**Author:** ![riban](https://discourse.zynthian.org/user_avatar/discourse.zynthian.org/riban/32/2331_2.png) [@riban](https://discourse.zynthian.org/u/riban)\
**Post date:** [November 21, 2024, 3:00pm UTC](https://discourse.zynthian.org/t/hotplug-usb-audio/10544/8 "2024-11-21T15:00:35Z")

</div>

Yeah! You should report that. 😉 It’s a bug. I think selecting customg and advanced then refreshing might work.

---

<div class="post-metadata">

**Author:** ![maartmaart](https://discourse.zynthian.org/user_avatar/discourse.zynthian.org/maartmaart/32/12972_2.png) [@maartmaart](https://discourse.zynthian.org/u/maartmaart)\
**Post date:** [November 21, 2024, 3:01pm UTC](https://discourse.zynthian.org/t/hotplug-usb-audio/10544/9 "2024-11-21T15:01:47Z")

</div>

Hi Riban…  
What about manually on the command line?

Cheers

---

<div class="post-metadata">

**Author:** ![maartmaart](https://discourse.zynthian.org/user_avatar/discourse.zynthian.org/maartmaart/32/12972_2.png) [@maartmaart](https://discourse.zynthian.org/u/maartmaart)\
**Post date:** [November 21, 2024, 3:03pm UTC](https://discourse.zynthian.org/t/hotplug-usb-audio/10544/10 "2024-11-21T15:03:33Z")

</div>

> [@Hotplug USB audio](https://discourse.zynthian.org/t/hotplug-usb-audio/10544/8):
>
> Yeah! You should report that. wink It’s a bug. I think selecting customg and advanced then refreshing might work.

Thanks. At least I know now tha I am not crazy… 🙂  
Cheers

---

<div class="post-metadata">

**Author:** ![riban](https://discourse.zynthian.org/user_avatar/discourse.zynthian.org/riban/32/2331_2.png) [@riban](https://discourse.zynthian.org/u/riban)\
**Post date:** [November 21, 2024, 3:09pm UTC](https://discourse.zynthian.org/t/hotplug-usb-audio/10544/11 "2024-11-21T15:09:06Z")

</div>

> [@maartmaart](#):
>
> What about manually on the command line?

```auto
git -C /zynthian/zynthian-ui checkout Feature/Hotplug_audio
/zynthian/zynthian-sys/scripts/update_zynthian.sh

```

---

<div class="post-metadata">

**Author:** ![maartmaart](https://discourse.zynthian.org/user_avatar/discourse.zynthian.org/maartmaart/32/12972_2.png) [@maartmaart](https://discourse.zynthian.org/u/maartmaart)\
**Post date:** [November 21, 2024, 3:18pm UTC](https://discourse.zynthian.org/t/hotplug-usb-audio/10544/12 "2024-11-21T15:18:27Z")

</div>

> [@riban](#):
>
> `git -C /zynthian/zynthian-ui checkout Feature/Hotplug_audio`

Hi Riban,

I think something is nok…  
I get:‘error: pathspec ‘Feature/Hotplug\_audio’ did not match any file(s) known to git’

I will wait until wanthalf is ‘synced’

Thanks again guys for the fast and knowledgeable resposes…

Cheers,  
maarten

---

<div class="post-metadata">

**Author:** ![maartmaart](https://discourse.zynthian.org/user_avatar/discourse.zynthian.org/maartmaart/32/12972_2.png) [@maartmaart](https://discourse.zynthian.org/u/maartmaart)\
**Post date:** [November 21, 2024, 4:38pm UTC](https://discourse.zynthian.org/t/hotplug-usb-audio/10544/13 "2024-11-21T16:38:29Z")

</div>

Hi @riban ,

My mistake… without realizing it… I had the origin path in zynthian-ui/.git/config to ‘url = [GitHub - wanthalf/zynthian-ui: User Interface for Zynthian](https://github.com/wanthalf/zynthian-ui.git)’ in stead of url = [GitHub - zynthian/zynthian-ui: User Interface for Zynthian](https://github.com/zynthian/zynthian-ui.git)’.

Changing it made it possible to select ‘Feature/Hotplug\_audio’  
Really FANTASTIC!! Now the keyboard can be routed to a different amplifier!!! (unfortunately my z5touch soft buttons are goen…)  
This is a really great feature!! Thanks!

Cheers,

Maarten

---

<div class="post-metadata">

**Author:** ![riban](https://discourse.zynthian.org/user_avatar/discourse.zynthian.org/riban/32/2331_2.png) [@riban](https://discourse.zynthian.org/u/riban)\
**Post date:** [November 21, 2024, 4:41pm UTC](https://discourse.zynthian.org/t/hotplug-usb-audio/10544/14 "2024-11-21T16:41:33Z")

</div>

Well done! Please test it and give feedback. It would be good to move this to vangelis soon.

---

<div class="post-metadata">

**Author:** ![Funkylsk](https://discourse.zynthian.org/letter_avatar_proxy/v4/letter/f/a9adbd/32.png) [@Funkylsk](https://discourse.zynthian.org/u/Funkylsk)\
**Post date:** [November 21, 2024, 4:46pm UTC](https://discourse.zynthian.org/t/hotplug-usb-audio/10544/15 "2024-11-21T16:46:13Z")

</div>

I tried yesterday to update my zynthian with no luck, first time I’ve seen the update working, but “no space left on device” at the middle of the update. No surprise : error ahah

Second time, I recreated the SD card with the latest stable, changed the software repo, and error again, I did not read the doc about that 🫢 I will try again this evening 🙂

---

<div class="post-metadata">

**Author:** ![riban](https://discourse.zynthian.org/user_avatar/discourse.zynthian.org/riban/32/2331_2.png) [@riban](https://discourse.zynthian.org/u/riban)\
**Post date:** [November 21, 2024, 4:49pm UTC](https://discourse.zynthian.org/t/hotplug-usb-audio/10544/16 "2024-11-21T16:49:27Z")

</div>

How big is your SD? I ran out of space yesterday on a 32GB (I think) but that is a dev machine that has lots of stuff on it. (People should stop asking for new plugins…) This shouldn’t be a problem so report it, ideally with webconf “Report Issue” button.

---

<div class="post-metadata">

**Author:** ![maartmaart](https://discourse.zynthian.org/user_avatar/discourse.zynthian.org/maartmaart/32/12972_2.png) [@maartmaart](https://discourse.zynthian.org/u/maartmaart)\
**Post date:** [November 21, 2024, 5:03pm UTC](https://discourse.zynthian.org/t/hotplug-usb-audio/10544/17 "2024-11-21T17:03:24Z")

</div>

> [@Hotplug USB audio](https://discourse.zynthian.org/t/hotplug-usb-audio/10544/14):
>
> Well done! Please test it and give feedback. It would be good to move this to vangelis soon.

hI @riban

I notice that when the instrument chain is set to Chain inputs = Main Mixbus and nothing is selected in the MAIN audio out window the audio of the instrument is sent to output 1 and 2…

Perhaps I am missing something?

Deselecting Chain inputs = Main Mixbus makes it possible in direct outputs to select any of the outputs 🙂 and have the piano left on the LEWITT and right on the SCARLETT… 🙂  
So… Great!!

Cheers,

Maarten

---

<div class="post-metadata">

**Author:** ![riban](https://discourse.zynthian.org/user_avatar/discourse.zynthian.org/riban/32/2331_2.png) [@riban](https://discourse.zynthian.org/u/riban)\
**Post date:** [November 21, 2024, 5:09pm UTC](https://discourse.zynthian.org/t/hotplug-usb-audio/10544/18 "2024-11-21T17:09:07Z")

</div>

I didn’t understand that but it looks like you have solved it.

Each audio chain (synth, audio effects, etc.) allows routing with its audio out menu to any direct output and to any other audio effect chain. These are arranged as individual outputs which allow stereo to mono routing and also as consecutive pairs that allows stereo ouput routing.

Each audio effect chain allows routing with its audio in menu from any physical audio input. These are presented as individual inputs allowing mono to stereo input routing or, if consecutive inputs are selected, stereo input selection.

The input and output routing screens differ with the pairing of ports. I wonder if that should be more consistent?

---

<div class="post-metadata">

**Author:** ![maartmaart](https://discourse.zynthian.org/user_avatar/discourse.zynthian.org/maartmaart/32/12972_2.png) [@maartmaart](https://discourse.zynthian.org/u/maartmaart)\
**Post date:** [November 21, 2024, 5:23pm UTC](https://discourse.zynthian.org/t/hotplug-usb-audio/10544/19 "2024-11-21T17:23:44Z")

</div>

> [@maartmaart](#):
>
> I notice that when the instrument chain is set to Chain inputs = Main Mixbus and nothing is selected in the MAIN audio out window the audio of the instrument is sent to output 1 and 2…

I think that selecting only Chain inputs = Main Mixbus of the instrument chain and NO audio output of the MAIN (mixbus) chain (the most right ‘chain’) should lead to NO audio…?  
(Have to laugh… its clear English is not my native language 🙂 )

i also noticed that the audio input and output in the MOD-UI host are always audio in/output: 1 and 2? It is alway called captue 1&2…

Cheers,  
Maarten

PS otherwise I will wait until it is merged in the Wanthalf branche. I wil make the snapshots which wil be a lot more clear… (I hope 🤣)

---

<div class="post-metadata">

**Author:** ![wyleu](https://discourse.zynthian.org/user_avatar/discourse.zynthian.org/wyleu/32/514_2.png) [@wyleu](https://discourse.zynthian.org/u/wyleu)\
**Post date:** [November 21, 2024, 5:25pm UTC](https://discourse.zynthian.org/t/hotplug-usb-audio/10544/20 "2024-11-21T17:25:06Z")

</div>

> [@Hotplug USB audio](#):
>
> Yeah! You should report that. wink It’s a bug.

Would you? could you?

The more use the reporting system gets the slicker it becomes and then more people use it…  
It helps us all.  
[Normal house rules apply…](https://wiki.zynthian.org/index.php/Talk:Zynthian_Wiki_Home)

[Next page](https://discourse.zynthian.org/t/hotplug-usb-audio/10544.md?page=2)
