# Zynthian dac adac light ready for codec development

**URL:** <https://discourse.zynthian.org/t/zynthian-dac-adac-light-ready-for-codec-development/10527>\
**Category:** Hardware\
**Created:** [November 18, 2024, 5:48pm UTC](https://discourse.zynthian.org/t/zynthian-dac-adac-light-ready-for-codec-development/10527 "2024-11-18T17:48:19Z")\
**Posts on this page:** 20\
**Page:** 7

<div class="post-metadata">

**Author:** ![stojos](https://discourse.zynthian.org/user_avatar/discourse.zynthian.org/stojos/32/10833_2.png) [@stojos](https://discourse.zynthian.org/u/stojos)\
**Post date:** [November 27, 2024, 7:38pm UTC](https://discourse.zynthian.org/t/zynthian-dac-adac-light-ready-for-codec-development/10527/121 "2024-11-27T19:38:44Z")

</div>

> [@riban](#):
>
> Also, think mono, not stereo.

What do you mean ? In regards of jacks (having two mono instead of one stereo) or something else ?

---

<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 27, 2024, 8:30pm UTC](https://discourse.zynthian.org/t/zynthian-dac-adac-light-ready-for-codec-development/10527/122 "2024-11-27T20:30:42Z")

</div>

Just generally, avoid grouping pairs of inputs/outputs. The may transport pair up the streams but we treat them as individual audio that can be used as mono or part of a larger group.

---

<div class="post-metadata">

**Author:** ![Kirtai](https://discourse.zynthian.org/user_avatar/discourse.zynthian.org/kirtai/32/12530_2.png) [@Kirtai](https://discourse.zynthian.org/u/Kirtai)\
**Post date:** [November 27, 2024, 10:01pm UTC](https://discourse.zynthian.org/t/zynthian-dac-adac-light-ready-for-codec-development/10527/123 "2024-11-27T22:01:35Z")

</div>

This is all very, very cool ❤

> [@stojos](#):
>
> I think that there will be a lot of interest to buy raspberry audio hat with two inputs and one output outside of zynthian project fir less than 30£.

I wonder, would this also work as a 1 in/1 out for older Pis too? Maybe with a jumper to disable the second input?

---

<div class="post-metadata">

**Author:** ![stojos](https://discourse.zynthian.org/user_avatar/discourse.zynthian.org/stojos/32/10833_2.png) [@stojos](https://discourse.zynthian.org/u/stojos)\
**Post date:** [November 27, 2024, 10:04pm UTC](https://discourse.zynthian.org/t/zynthian-dac-adac-light-ready-for-codec-development/10527/124 "2024-11-27T22:04:38Z")

</div>

Codec and overlay will need to be slightly changed for rpi4 but not much.

Once we get it working on rpi4 it can be merger into single codec and overlay - there are ways to do that.

---

<div class="post-metadata">

**Author:** ![Kirtai](https://discourse.zynthian.org/user_avatar/discourse.zynthian.org/kirtai/32/12530_2.png) [@Kirtai](https://discourse.zynthian.org/u/Kirtai)\
**Post date:** [November 27, 2024, 10:08pm UTC](https://discourse.zynthian.org/t/zynthian-dac-adac-light-ready-for-codec-development/10527/125 "2024-11-27T22:08:57Z")

</div>

Excellent, thank you. ❤

Messing around with all the different sound boards is the thing I dislike most about Pi based audio projects.

---

<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 28, 2024, 8:01am UTC](https://discourse.zynthian.org/t/zynthian-dac-adac-light-ready-for-codec-development/10527/126 "2024-11-28T08:01:53Z")

</div>

Enabling i2s\_clk\_consumer seems to be sufficient to enable all the GPIO pins too so the first fragment of the dts is not required.

I have not yet found a way to limit the quantity of I2S ports enabled so, using i2s\_clk\_consumer will always expose 8 audio inputs and outputs which is misleading to the user if they fewer I2S devices connected. Zynthian shows 8 ins and 8 outs but I only have 4 of each.

---

<div class="post-metadata">

**Author:** ![stojos](https://discourse.zynthian.org/user_avatar/discourse.zynthian.org/stojos/32/10833_2.png) [@stojos](https://discourse.zynthian.org/u/stojos)\
**Post date:** [November 28, 2024, 8:52am UTC](https://discourse.zynthian.org/t/zynthian-dac-adac-light-ready-for-codec-development/10527/127 "2024-11-28T08:52:20Z")

</div>

I think that jackd -i and -o option can configure that. Users should be advised to use these options and set them accordingly.

---

<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 28, 2024, 10:48am UTC](https://discourse.zynthian.org/t/zynthian-dac-adac-light-ready-for-codec-development/10527/128 "2024-11-28T10:48:14Z")

</div>

> [@stojos](#):
>
> jackd -i and -o option can configure that

Yes, we can certainly use that in jack config to limit the quantity of i/o. It would be nicer if the alsa driver worked nicely though - being able to define which ports are in use rather than just truncating it in jack.

---

<div class="post-metadata">

**Author:** ![le51](https://discourse.zynthian.org/user_avatar/discourse.zynthian.org/le51/32/1706_2.png) [@le51](https://discourse.zynthian.org/u/le51)\
**Post date:** [November 28, 2024, 11:02am UTC](https://discourse.zynthian.org/t/zynthian-dac-adac-light-ready-for-codec-development/10527/129 "2024-11-28T11:02:23Z")

</div>

Some updates here.  
I have added an external pcm5012a and tied the noisy ring input to RBPi GND, I’ve got the codec loaded, Zynthian runs, but I still have noise.

---

<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 28, 2024, 11:43am UTC](https://discourse.zynthian.org/t/zynthian-dac-adac-light-ready-for-codec-development/10527/130 "2024-11-28T11:43:57Z")

</div>

If you have the PCM1808 connected without fixing the PCB problem then it will be noisy.

---

<div class="post-metadata">

**Author:** ![le51](https://discourse.zynthian.org/user_avatar/discourse.zynthian.org/le51/32/1706_2.png) [@le51](https://discourse.zynthian.org/u/le51)\
**Post date:** [November 28, 2024, 12:00pm UTC](https://discourse.zynthian.org/t/zynthian-dac-adac-light-ready-for-codec-development/10527/131 "2024-11-28T12:00:07Z")

</div>

Ok  
since yesterday, I’m searching for my scalpel 🫤

---

<div class="post-metadata">

**Author:** ![stojos](https://discourse.zynthian.org/user_avatar/discourse.zynthian.org/stojos/32/10833_2.png) [@stojos](https://discourse.zynthian.org/u/stojos)\
**Post date:** [November 28, 2024, 1:33pm UTC](https://discourse.zynthian.org/t/zynthian-dac-adac-light-ready-for-codec-development/10527/132 "2024-11-28T13:33:15Z")

</div>

> [@riban](#):
>
> It would be nicer if the alsa driver worked nicely though

I saw the same behaviour on Hifiberry dac adac pro on rpi5. Their codec also show 8 ports even though they have only 2.

The difference is that for their card you have to set jackd -o option to 2 otherwise it will not work no matter what of 8 input ports you try to use.

---

<div class="post-metadata">

**Author:** ![le51](https://discourse.zynthian.org/user_avatar/discourse.zynthian.org/le51/32/1706_2.png) [@le51](https://discourse.zynthian.org/u/le51)\
**Post date:** [November 28, 2024, 4:00pm UTC](https://discourse.zynthian.org/t/zynthian-dac-adac-light-ready-for-codec-development/10527/133 "2024-11-28T16:00:44Z")

</div>

> [@riban](#):
>
> Enabling i2s\_clk\_consumer seems to be sufficient to enable all the GPIO

Yeah, I suspect that this is now the default RBPi behavior whenever you choose I2S0/clock producer or I2S1/clock consumer.  
I still have to investigate further, because things are moving really quickly in the audio subsystem these day and it’s hard to follow (for me at least).

Anyway, showing 8 channels while there’s only 2/4/6 available, is not such a big issue IMO …

---

<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 28, 2024, 4:05pm UTC](https://discourse.zynthian.org/t/zynthian-dac-adac-light-ready-for-codec-development/10527/134 "2024-11-28T16:05:37Z")

</div>

> [@le51](#):
>
> showing 8 channels while there’s only 2/4/6 available, is not such a big issue IMO

I think it is a problem. Showing this screen when there are only 2 inputs is a bit crap:

 ![image](https://discourse.zynthian.org/uploads/default/original/2X/4/4bf73d8ef0bf865ce4a385b3b4c5f483642c3c03.jpeg)

---

<div class="post-metadata">

**Author:** ![le51](https://discourse.zynthian.org/user_avatar/discourse.zynthian.org/le51/32/1706_2.png) [@le51](https://discourse.zynthian.org/u/le51)\
**Post date:** [November 28, 2024, 4:21pm UTC](https://discourse.zynthian.org/t/zynthian-dac-adac-light-ready-for-codec-development/10527/135 "2024-11-28T16:21:04Z")

</div>

Yeah you’re right. For new comers, it could strange, I agree. But, as it looks like a choice from RaspberryPi in their own internal I2S implementation, I think that’s not a lot we can do to change this except finding some “Zynthian specific” workarounds.

---

<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 28, 2024, 4:35pm UTC](https://discourse.zynthian.org/t/zynthian-dac-adac-light-ready-for-codec-development/10527/136 "2024-11-28T16:35:15Z")

</div>

I have pushed a change to the codec driver that allows max channels for each of capture and playback to beset via device overlay. I need to work on getting this configured from a setting in config.txt. There is simple conditional stuff in dts so I hope to be able to do this later.

---

<div class="post-metadata">

**Author:** ![le51](https://discourse.zynthian.org/user_avatar/discourse.zynthian.org/le51/32/1706_2.png) [@le51](https://discourse.zynthian.org/u/le51)\
**Post date:** [November 28, 2024, 4:37pm UTC](https://discourse.zynthian.org/t/zynthian-dac-adac-light-ready-for-codec-development/10527/137 "2024-11-28T16:37:11Z")

</div>

> [@riban](#):
>
> I have pushed a change to the codec driver that allows max channels for each of capture and playback to beset via device overlay.

this is what I call a “Zynthian specific workaround” 😙

---

<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 28, 2024, 7:05pm UTC](https://discourse.zynthian.org/t/zynthian-dac-adac-light-ready-for-codec-development/10527/138 "2024-11-28T19:05:10Z")

</div>

Okay - the latest version now accepts options to set the quantity of inputs and outputs. The README is updated but basically the config.txt syntax is:

`dtoverlay=zynaudio8x,inputs=4,outputs=2`

`inputs` and `outputs` are optional parameters that limit the quantity of input (capture) and output (playback) ports. Range 0…8 and must be even. Invalid values will default to 8.

What else is there???

---

<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 28, 2024, 7:13pm UTC](https://discourse.zynthian.org/t/zynthian-dac-adac-light-ready-for-codec-development/10527/139 "2024-11-28T19:13:58Z")

</div>

A snappy christmas hit with a catchy sing along chorus…?

---

<div class="post-metadata">

**Author:** ![stojos](https://discourse.zynthian.org/user_avatar/discourse.zynthian.org/stojos/32/10833_2.png) [@stojos](https://discourse.zynthian.org/u/stojos)\
**Post date:** [November 28, 2024, 7:44pm UTC](https://discourse.zynthian.org/t/zynthian-dac-adac-light-ready-for-codec-development/10527/140 "2024-11-28T19:44:51Z")

</div>

> [@riban](#):
>
> What else is there???

Would it be possible to request zynaudio8x codec and overlay to be included to raspberry kernel source? Does anyone know what the process?

[Previous page](https://discourse.zynthian.org/t/zynthian-dac-adac-light-ready-for-codec-development/10527.md?page=6)

[Next page](https://discourse.zynthian.org/t/zynthian-dac-adac-light-ready-for-codec-development/10527.md?page=8)
