"speaker-test" audio crackles using whiite
August 09, 2013 05:58AM
I've tried practically every combination of ALSA configurations in order to achieve smooth audio playback. Using the default configuration, audio playback is very crackly/scratchy. I use this command to test two channels using a sine wave:

speaker-test -c 2 -t sine

In an attempt to fix this, I created the ALSA configuration file: /etc/asound.conf

My goal is to play two-channel, 16-bit, and 48 kHz audio. I've tried adjusting the period time and buffer time (microseconds), period size and buffer size (frames; four bytes per frame), and the number of periods per buffer. All of this junk leaves me with less crackling, but any crackling is unacceptable. (Geexbox Wii's audio playback is also scratchy.)

1. Does smooth audio playback work using the Wii Linux audio driver?
2. Will you please help me fix this? I've spent countless days with no success. :'(

Best ALSA resources I could find:
http://www.alsa-project.org/main/index.php/FramesPeriods
http://www.alsa-project.org/alsa-doc/alsa-lib/pcm_plugins.html#pcm_plugins_dmix
http://jan.newmarch.name/LinuxSound/Sampled/Alsa/

Audio driver reference (I'm using MIKE p5, though):
https://github.com/DeltaResero/GC-Wii-Linux-Kernel-3.0.y/blob/master/sound/ppc/gcn-ai.c



Edited 1 time(s). Last edit at 08/09/2013 06:01AM by SmartOne.
Re: "speaker-test" audio crackles using whiite
August 11, 2013 06:04AM
I don't know whether this will help you at all, but I was having the same problem running Ubuntu. I'm not at all sure what fixed it, but I noticed it was fixed after I had switched from Ubuntu Desktop (Gnome) to Xubuntu (Xfce). Like I said, I don't know if this information will help you, but I figured I mention it. When I get the time, I'll see if there's a /etc/asound.conf in each archive. In the meantime, I wish you luck.



Edited 1 time(s). Last edit at 08/12/2013 12:53AM by q885.
Re: "speaker-test" audio crackles using whiite
August 13, 2013 05:27AM
I'm not using any window manager. My goal is to use the Wii as a headless UPnP MediaRenderer: (https://github.com/hzeller/gmrender-resurrect)

I always see this error message (twice?) at boot:

/lib/modules/2.6.32-isobel-wii: No such file or directory

I'm investigating "depmod." Uh, how do I install these (required for smooth audio playback?!) kernel modules?



Edited 1 time(s). Last edit at 08/13/2013 06:58AM by SmartOne.
Re: "speaker-test" audio crackles using whiite
August 15, 2013 01:04AM
I checked my archives to see if they contained an "/etc/asound.conf". Neither did. Sorry.

Let me know if you get "depmod" working. I never did. Operating under the assumption that the Isobel kernel didn't use modules, I just created an empty file called "/lib/modules/2.6.32-isobel-wii/modules.dep". That got rid of the error. You could also look into using a different kernel, which would most likely fix this problem.
Re: "speaker-test" audio crackles using whiite
August 15, 2013 01:34AM
Kernel modules are created as part of the kernel compilation procedure. The mikeP5 kernel wasn't packaged with all its modules, and they aren't in the whiite distributions either. You can build the kernel from scratch following the directions on GC Linux, or you can check out Easy Wii Linux. I built all the relevant modules and included them in the linux disk image.
Re: "speaker-test" audio crackles using whiite
August 15, 2013 05:50AM
Thank you so much for your help. Wow, I tried using "snd-hwdep.ko" from farter's Wii Debian distribution in the "/lib/modules/2.6.32-isobel-wii" directory. After solving the "vermagic" problem, modprobe finally failed with "Invalid module format."

So you think a different distribution will have the required audio kernel modules for smooth ("works") playback? Maybe I'll try another. I'm running out of SD cards. :( Even Geexbox Wii can't play audio files smoothly. That's suspicious.

I know nothing about building kernels. Do you have a link to a Wii-specific guide? Isn't MIKE p5 the latest "official" Wii Linux kernel? I didn't know a kernel could have dependencies on modules for kernel features such as "working" audio.
Re: "speaker-test" audio crackles using whiite
August 15, 2013 10:21AM
Here's the guide linus was referring to
[www.gc-linux.org])
Re: "speaker-test" audio crackles using whiite
August 15, 2013 11:39PM
Which part of that guide is the modules? Does the MIKE p5 kernel patch contain the audio module that will fix my audio playback?
Re: "speaker-test" audio crackles using whiite
August 17, 2013 05:49AM
Easy Wii Linux has the same problem as as whiite:

mpg123 smooth.mp3

Full of crackles and non-smoothness!

http://www.gc-linux.org/wiki/Wii:Hardware_Support

That page is damn false! The green box for "supporting" audio hardware should be red. What a joke.

My only option is to use WiiMC with it's broken GUI and plentiful bugs. (lol, 50% = 0 dB) The horror.

No UPnP for me.
Re: "speaker-test" audio crackles using whiite
August 17, 2013 06:07AM
Try Xubuntu Feisty Wii. In my tests, the problem was completely gone. I can't say why it works, but as far as I can tell, it does. Let me know if it doesn't work for you.
Re: "speaker-test" audio crackles using whiite
August 18, 2013 01:10AM
Okay, I'll give this one last try. ;)
Re: "speaker-test" audio crackles using whiite
August 20, 2013 04:49AM
Same damn problem. Do you use Wii Linux for serious audio playback? Listen to the "speaker-test" command above for a few seconds. It's immediately snap-crackle-poppy.

Unless someone has a magic fix, I've spent enough of my life on this.

I would use the PS3 for UPnP, but Sony's software is buggy (of course). Using a wireless connection on the PS3, the 44.1 kHz PS3 playback setting causes skipping. Using 48 kHz fixes the skipping and causes "constrained" sound. Awesome, huh?

http://community.us.playstation.com/t5/PSN-Video-and-Music-General/Streaming-Wireless-Audio-Problems/td-p/7724665

If the geniuses at Sony got their code right, I wouldn't even be here. (Why don't they remove all of their features and save everyone time?)
Re: "speaker-test" audio crackles using whiite
August 21, 2013 09:50AM
To compile modules do this:
make ARCH=powerpc CROSS32_COMPILE=powerpc-linux- CROSS_COMPILE=powerpc-linux- modules

Then to build the modules to a directory of your choice:
make ARCH=powerpc CROSS32_COMPILE=powerpc-linux- CROSS_COMPILE=powerpc-linux- modules_install INSTALL_MOD_PATH={type the full path here}
Re: "speaker-test" audio crackles using whiite
August 23, 2013 11:27PM
Is this fix magical? In other words, does this fix install "the audio module that will fix my audio playback?"
Re: "speaker-test" audio crackles using whiite
August 24, 2013 11:02AM
It's not a fix but it will stop depmod from complaining. Incidentally, alsa support is compiled within Mikep5 so modules are not really a problem for you (just an error message at boot).

I don't use any audio on my Wii Linux because I use it purely for writing fiction on but I seem to remember EWL had no problems (maybe that didn't use Alsa).

I found this post which may or may not be useful to you
Sorry, only registered users may post in this forum.

Click here to login