Post Go back to editing

zedboard kuiper no headphone output from gnuradio or audacity

Category: Software
Product Number: kuiper
Hi,
 
I am using the latest release ( March 2025 ) of kuiper for zedboard but I can not get any headphone output from either audacity or gnuradio, in fact I have never been able to get headphone audio with any version of  kuiper.
The audacity does say there is an "assertion failed ! ./src/AudioIO.cpp(973):assert "false" Failed in AudioIO()." It did not give this error in previous versions of kuiper but as I said  there was never any audio anyway. I have tried it on 2 zedboards so I do not think it is a hardware issue. any help you can give me with this would be appreciated even if it to try a different way to force headphone audio just to prove the alsa setup is correct.( BTW playback device under audacity is ZED ADAU1761... hw(1,0).
 
Tony Smith.
  • Hi Tony

    To check if the ADAU1761 is recognized, try running the ALSA commands aplay -l or arecord -l on the ZED board.  This will list the playback or record devices in the system.  The ADAU1761 should be returned;  in my case it is card 1.

    If that works, try adding a pair of headphones to the headphone jack of the ZED board.  You can run the ALSA command speaker-test to generate a test tone and verify that it is working.  This command will play a stereo 1khz tone at 48kHz, alternating between the channels:

    speaker-test -t sine -f 1000 -D hw:1,0 -r 48000 -c 2 -F S32_LE

    Now you won't hear anything unless you configure the playback path on the codec.  Run the ALSA command amixer -c 1 (replace the '1' with your card number), and you will get a list of all the controls that can be set on this codec, and their current status.  There are a lot of them.   You'll need the ADAU1761 datasheet and figure 32 (record path) and figure 44 (playback path) to work out what they all mean and how to set them.   You can use the amixer commands to do the configuration.   Or you can run alsamixer -c 1, and use the graphical tool to configure the record and playback paths.  

    When you have the playback path configured correctly, you can run the speaker-test again and you will hear the tone through the headphones.

    Now getting the audio to a tool like gnuradio or Audacity is another thing. I don't think we have an example for that, so it's outside the scope of what I can offer.  If gnuradio were running directly on the ZED, you would be able to just reference the ADAU1761 as hw:1,0 in the audio source and sink blocks.  But you probably mean that you have these apps running on a host machine.  So you'll need to get the audio shipped over the network to your host.  I'd probably try setting up a network socket using UDP on the ZED, and then use the UDP source and sink blocks in gnuradio. I'm sure there are other ways to do it as well.  I'm not familiar at all with Audacity.  Perhaps one of the community members with more experience using these tools will chime in.  Hope this helps.

    Regards

    Andy

  • Hi Andy,

    Some limited progress. Using alsamixer I set the gain for the headphone at -13dBm, -13dBm, I enabled the "Left Playback Mixer Left DAC" by clicking on the MM (mute mute ?) and enabled the  "Right Playback Mixer Right DAC" clicking on the MM again. By then running the speaker-test as detailed above it "provoked audio" but not at 1kHz but it sounds like distorted mains hum at about 50Hz.  I tried various controls in alsamixer but these were the only ones that seemed to make a difference apart from digital gain which does make a difference to the volume.

    Have you managed to actually try this on a zedboard and get it running ?

    Regards,

    Tony

  • Hi Tony

    I didn't try a specific configuration.  We don't have a formal example to follow, but I did find this prior post with a specific configuration that may be worth trying.  Let me know if it helps.   (+) Zedboard ADAU1761 audio capture not working. - Q&A - Linux Software Drivers - EngineerZone
    Regards
    Andy
  • Hi Andy,

    Yes it worked ! It was the "DAC playback MUX" to AIFIN I cannot see that on the "playback path diagram" in the datasheet. Any idea what AIFIN stands for ? ( It had been set as DSP as default )

    Anyway it worked thanks very much, also worked in Gnuradio and Audacity as well.

    Regards,

    Tony 

  • Hi Tony

    Glad to hear it worked!  Yes AIFIN is a bit cryptic and I don't find any references to it.  I believe it stands for "audio interface input".  The ADAU1761 has an audio DSP engine, and by default, the DAC sources digital audio data from the DSP.  We don't want that here; the default needs to be changed so the DAC sources audio from the "audio interface" (aka the serial port, which is connected to the FPGA).  To know for sure will require digging into the source code.  

    What was your solution to get the audio data into Gnuradio and Audacity?

    Regards

    Andy

  • Hi Andy,

    They both worked straight away once AIFIN had been selected as per your previous solution.

    Gnuradio uses a device name of hw:1,0 and audacity uses the essentially the same driver from a drop down list

    AIFIN has persistence once selected, so perhaps it could be made the default in the SD card image to stop other people having the same problem ?

    I would not have solved it without your help.

    regards,

    Tony