Thank you for your donation!


Cloudsmith graciously provides open-source package management and distribution for our project.


Thread Closed 
Problem: Audio Glitches
#11
(11-17-2022, 10:35 PM)TheOldPresbyope Wrote: @awrc68

Some things you've written don't make sense to me.

Quote:I made a couple of minor changes to config.txt to add support for the gpio_fan overlay and dropped the GPU mem to 16. 

When you've come to this forum for help, first present the symptoms of the "default" system, not one with hand-edited changes to deep system parameters such as gpu_mem. It may seem innocuous but ....

Quote:I found a couple of references via Google search that point the finger at the 5122 - including one person who was having this exact problem until he went into alsamixer and changed the left and right auto-mute time from 21ms to 2s or so....  

I used the HiFiBerry-equivalent board, which also has the 5122 DAC chip, for more than a year without any clicks/glitches. Nothing found in an Internet search should be accepted at face value. I thought these settings were in the board driver and/or board itself.

Quote:...Of course, when I did that (the auto mute times were set that low) not only did it not fix the problem, it caused /boot/config.txt to disappear. 

No /boot/config.txt? That's very odd. I don't expect it and can't repro it by playing with alsamixer.

Quote:The 32-bit version, when I went to configure the audio hardware hadn’t auto-detected an I2S device. 

I don't understand what you mean. There's no auto-detection of i2S devices in either 64-bit or 32-bit moOde.

Quote:Set it to I2S device, restarted, had to select the DAC+

This seems backwards. I'd expect first to select a specific i2S type/driver and then after reboot see the output device has been set to "i2S audio device".

Good luck in your hunt.

Regards,
Kent

Yes, the rolling back of the changes when I started doing more tests reflected that I wanted to eliminate any other changes I’d made that could be causing problems.  The fact that I’d made those changes at all - well, every Pi I’ve built since my first Pi 1 has had gpu_mem at 16, because they’ve all been headless, and since I knew I was working on a somewhat underpowered system, it seemed sensible to leave as much memory as possible.  The fan overlay, yeah, should have left that alone.

One difference (maybe, if it’s the HiFiBerry board I’ve seen when searching) re the DAC+ and the HiFiBerry is that the DAC+, due to the headphone jack, has a small dedicated amp on the board for the headphones (and that the headphone detect signal is tied to the mute/unmute for the board as a whole, not sure if it’s relevant).  While the click seems to be due to the auto mute/unmute, if the click itself is due to electrical noise on the board, the effect it could have on the headphone amp and jack might be disproportionately large compared to the effect on the “real” audio jacks.  I’ve certainly noticed that the on/off of the power switch is audible on the headphone jack.

The auto-mute time settings are, I believe, in the driver.  I’m currently trying to figure out if there’s a way to set these driver values in config.txt (I’ve not been able to determine what, if anything, would get those values set in the UI).  If I can set the mute/unmute ramp time to something suitably long ziti appears to max out at 10s) I’ll only get the click when I start playing and when I stop.  If I can figure out what I’m doing wrong re software volume control, that seems to unmute at power-on and mute during shutdown.  I always like doing things in hardware if it’s possible though - did enough digital design way back that I feel I’m ignoring the designer’s hard work if I don’t Smile

The /boot/config.txt vanishing is almost certainly me having missed something in the PHP files Tim mentioned yesterday, and one of my adds to it being in the wrong place and somehow causing sed to go on a rampage.  That at least is not a mystery to me, it’s 100% self-inflicted.

As for the auto-detection, I’d swear the first time I powered up, it had the device already selected, I assumed it was related to the EEPROM (which is supposed to eliminate the need to manually add the board overlay). Maybe that’s just down to a distribution difference - all my Pi’s have been Raspbian, and while I can claim 25 years of Linux admin it’s all been Debian, and for the last fifteen of those years it’s all been with friendly automated setup.  

I should probably be embarrassed that I’ve gone from building my own kernels to strictly an end-user, but I’m not, I decided four years ago that the dumbest thing I ever did was go to university and get a Comp Sci degree (because good pay) rather than English lit (because it was what I was best at - actually, no, I’ll take it further back, trying harder than was necessary to get by from age 4 was wasted effort) In fact, if I’d known my little headphone amp project was going to end up costing what it did (it started as a $25 project, so far it’s over $100) I’d have just bought a USB-C amp for my iPad  Undecided

Oh well - tomorrow I’ll start fresh, maybe with just a Raspbian Lite install to see if I can just get aplay to play a file without the mute/unmute clicks.  If it won’t even do that, trying to get something slick and cool like moOde to work is probably going to be beyond me, and maybe it’s best to just wait a month or two and buy something to plug into the iPad.


Messages In This Thread
Audio Glitches - by awrc68 - 11-17-2022, 04:38 PM
RE: Audio Glitches - by Tim Curtis - 11-17-2022, 04:52 PM
RE: Audio Glitches - by TheOldPresbyope - 11-17-2022, 07:01 PM
RE: Audio Glitches - by awrc68 - 11-17-2022, 07:16 PM
RE: Audio Glitches - by awrc68 - 11-17-2022, 08:20 PM
RE: Audio Glitches - by awrc68 - 11-17-2022, 08:50 PM
RE: Audio Glitches - by Nutul - 11-17-2022, 07:51 PM
RE: Audio Glitches - by TheOldPresbyope - 11-17-2022, 10:35 PM
RE: Audio Glitches - by awrc68 - 11-17-2022, 10:43 PM
RE: Audio Glitches - by awrc68 - 11-18-2022, 12:09 AM
RE: Audio Glitches - by Tim Curtis - 11-17-2022, 11:36 PM
RE: Audio Glitches - by Tim Curtis - 11-18-2022, 12:19 AM

Forum Jump: