Hardware volume

Hi,
Here is my xn file

<?xml version="1.0" encoding="UTF-8"?>
<Network xmlns="http://www.xmos.com"
     xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
     xsi:schemaLocation="http://www.xmos.com http://www.xmos.com">
  <Type>Device</Type>
  <Name>XU208-128-TQ64-C10 Device</Name>

  <Declarations>
<Declaration>tileref tile[1]</Declaration>
<Declaration>tileref usb_tile</Declaration>
  </Declarations>

  <Packages>
<Package id="0" Type="XS2-UnA-128-TQ64">
  <Nodes>
    <Node Id="0" InPackageId="0" Type="XS2-L8A-128" SystemFrequency="500MHz" OscillatorSrc="1">
      <Boot>
        <Source Location="bootFlash"/>
      </Boot>
      <Tile Number="0" Reference="tile[0]">
      <Port Location="XS1_PORT_1B" Name="PORT_SQI_CS"/>
        <Port Location="XS1_PORT_1C" Name="PORT_SQI_SCLK"/>
        <Port Location="XS1_PORT_4B" Name="PORT_SQI_SIO"/>
        
        <!-- Audio Ports -->          
        <Port Location="XS1_PORT_1D"  Name="PORT_MCLK_IN"/>
        <Port Location="XS1_PORT_1P"  Name="PORT_I2S_LRCLK"/>
        <Port Location="XS1_PORT_1O"  Name="PORT_I2S_BCLK"/>
        <Port Location="XS1_PORT_1N"  Name="PORT_I2S_DAC0"/>
        <Port Location="XS1_PORT_4C"  Name="PORT_I2C"/>
        
        <Port Location="XS1_PORT_1O"  Name="PORT_DSD_DAC0"/>
        <port Location="XS1_PORT_1N"  Name="PORT_DSD_DAC1"/>
        <Port Location="XS1_PORT_1P"  Name="PORT_DSD_CLK"/>
        <Port Location="XS1_PORT_16B"  Name="PORT_MCLK_COUNT"/> 
        
        <!-- USB Ports -->
        <Port Location="XS1_PORT_1H"  Name="PORT_USB_TX_READYIN"/>
        <Port Location="XS1_PORT_1J"  Name="PORT_USB_CLK"/>
        <Port Location="XS1_PORT_1K"  Name="PORT_USB_TX_READYOUT"/>
        <Port Location="XS1_PORT_1I"  Name="PORT_USB_RX_READY"/>
        <Port Location="XS1_PORT_1E"  Name="PORT_USB_FLAG0"/>
        <Port Location="XS1_PORT_1F"  Name="PORT_USB_FLAG1"/>
        <Port Location="XS1_PORT_1G"  Name="PORT_USB_FLAG2"/>
        <Port Location="XS1_PORT_8A"  Name="PORT_USB_TXD"/>
        <Port Location="XS1_PORT_8B"  Name="PORT_USB_RXD"/>
        </Tile>
    </Node>
    <Node Id="1" InPackageId="1" Type="periph:XS1-SU" Reference="usb_tile" Oscillator="24MHz">
    </Node>
  </Nodes>
  <Links>
    <Link Encoding="5wire">
      <LinkEndpoint NodeId="0" Link="8" Delays="52clk,52clk"/>
      <LinkEndpoint NodeId="1" Link="XL0" Delays="1clk,1clk"/>
    </Link>
  </Links>
</Package>
  </Packages>
<ExternalDevices>
<Device NodeId="0" Tile="0" Class="SQIFlash" Name="bootFlash">
  <Attribute Name="PORT_SQI_CS" Value="PORT_SQI_CS"/>
  <Attribute Name="PORT_SQI_SCLK" Value="PORT_SQI_SCLK"/>
  <Attribute Name="PORT_SQI_SIO" Value="PORT_SQI_SIO"/>
</Device>
  </ExternalDevices>

  <JTAGChain>
<JTAGDevice NodeId="0"/>
  </JTAGChain>

</Network>

regards

1 Like

Thank you so much! Unfortunately, it still doesn’t work. :confused:

Also, I’ve noticed that the music is garbled for a few seconds the first time I play after connecting the USB. Apparently, it only happens on my Macbook; testing it on Windows worked just fine. Next up is to try the Xtag on Windows. The plot thickens…

BTW: Does anyone else have playback issues with a Macbook? I’ve just tried it on a friend’s MB, and it was the same problem… :neutral_face:

…and now we’ve tried on a Windows PC: Same result… :frowning:

It should work on a Generic TB, right? What am I missing??

Which version you installed? Windows 7, 8 or 10?

Have fun!

Just received my tone board and found there’s no hardware volume control in Volumio. Please update the firmware asap! By the way, we could simply use pc to flash the firmware right?

1 Like

Hi, thanks for your reply!

We get the same result on Windows 10 and OS X Mojave. As mentioned, I tried with the XN file by occip (thanks again!) to no avail, so the fault lies elsewhere. Now, I’m thinking the Xtag, which works like a charm with the Xcore-200 board, so it may simply be my wiring (which I may very well have screwed up…), but after checking, double checking, triple checking, quadruple checking … I haven’t found any faults. My colleague had a look as well, and he also couldn’t find anything obvious.

Again, the Xcore-200 board works perfectly with the Xtag: I can read the firmware, I can xrun on it, I can xflash on it etc. etc. Everything seems to be working the way it should. With the Xtag connected to the TB, however: No connection.

I’m probably missing something, but I have no idea what… :confused:

One thing: Have you tried playing USB Audio from a Macbook? We’re getting some awful noise for a few seconds, after which it plays nicely, but only when playing from a Macbook (Mojave, we tried two different Macbooks, same result). Could you please check out this issue? If it doesn’t happen on other TBs, we may have a hardware defect on our hands…

Cheers!

Same here, Khadas please update XMOS firmware to include hardware volume control. Posts above show that user occip could do it so it’s not too difficult.

1 Like

Congrats occip!
Can you share more details and just control the volume of SPDIF?

We have reserved volume control and mute design but we need an accessory, probably a small PCB with a volume control button.The development of this accessory and the upgrade plan of XMOS software have been scheduled.

1 Like

Could you open source the other parts of your code that works together with that xn? I looked thru the USB audio guide for XMOS and looks like the most complicated part would be the I2C control, other than that it looks just standard parts of the example code.

Hello
I manage the dac volume with the usb interface :
I’m using volumio on a raspberry pi3 connected to IR receiver.
With a remote control I can pause volumio ( the tone board switches to the spdif input), and manage volume. I can do the same thing through the volumio app or a web browser.

A good alternative is to connect the IR Receiver directly to volume pin of the tone board with software handling.

Two updates. First one is related to my problem regarding custom firmware:

Ladies and gentlemen… I have connectivity!

Remember that I am a total noob? :baby: Turns out I thought TDSRC and TDSNK should be connected to TDO and TDI, respectively, not that they were aliases. My bad! :smile:

So, I have extracted the firmware and tried running the first one of my own making. Like occip, I do not have audio, so I suppose, I’ve reached occip level 3! :wink:

Thanks everyone for your help, I really appreciate it. And sorry for the inconvenience.

Anyway, less gossip - more occip! :wink: Time to make USB audio…

4 Likes

Next up - the Mac audio issue:

We still have terrible audio distortion on Mac (standard firmware).

@Gouwa, do you have any feedback on the issue?

Cheers…

Does Windows have this problem?Can you tell if the problem is hardware or driving software? Have you tried other macs?

Hi Ben007 and thanks for your reply.

No, Windows does not have this problem. We tried on a machine with Windows 10 - no problems.

Presumably, it’s the firmware, as the board plays nicely on Windows but not Mac. Also, after the distortion stops, the TB plays nicely on Mac as well (see elaboration below).

Yes, we tried with two different Macs, both with OS X Mojave, I subsequently installed an update to the latest Mojave (10.14.1 at the time of writing) - still distorted.

To elaborate:

  • The distortion occurs during the first few seconds of playback, and the sound is absolutely horrible. Then it normalises and plays just fine.
  • If you switch audio output to something else and back to the TB, it’s distorted again for a few seconds.
  • If you stop playback and wait a minute or so, it gets distorted again for a few seconds.
  • I’ve tried fiddling with the MIDI setup on my Mac, setting it explicitly to 32 bit output - didn’t help.
  • Playing on the Xcore-200 multi channel board from Xmos works like a charm - no problems whatsoever.
  • It sounds a bit like the volume is completely bonkers to begin with, as the distortion suggests the audio is oversteering, and then it settles. I notice that the TB does not support HW volume. Indeed, on my Mac, the system volume slider becomes inactive/greyed out when I choose the TB; something I’ve never seen before.

If you need more info, let me know.

1 Like

Can we get the small pcb and the xmos firmware update the end of this year? Thank you!

Next month will be OK!

great! Can we flash the firmware using our own pc? and how much does the small pcb cost?

YES

Not too much :slight_smile:

Hello occip.

Sorry to bother you again, but I was wondering if perhaps you could give me a hint or two… We’re trying to play back four channels of audio using I2S (probably left justified in the future), and we’re seeing lovely I2S on sin0 and sin1 along with lovely bclk and lrclk. Looks just fine on the oscilloscope, and it played very nicely on the Xcore200 board.

The thing is, the DAC seems to be utterly dead. Which it isn’t. Even though the I2S signals reach it at the appropriate pins, nothing comes out of it. We believe that we are pulling the reset signal low, then high some milliseconds later, which we think should do the trick. Also, the DAC seems to enter I2S mode by default, so it should just work.

I notice you didn’t have audio initially, either. What was your issue? What on earth are we missing? Are we resetting it incorrectly? Is there some mute config or something we need to fiddle with?

Thanks!

  • Coolheinze