[raspberry-vi] Re: Article: Ubuntu mate

  • From: jacob Kruger <jacob@xxxxxxxxxxxxx>
  • To: raspberry-vi@xxxxxxxxxxxxx
  • Date: Tue, 8 Mar 2016 08:50:06 +0200

Matthew, did the file just extract as a file with no extension?

It should be a .img file, and, like said, just had to use road kill off 
windows to rewrite it to an SDCard.

Stay well

Jacob Kruger
Blind Biker
Skype: BlindZA
"Roger Wilco wants to welcome you...to the space janitor's closet..."

On 2016-03-08 6:10 AM, Matthew Cabraja wrote:

Hi
I have had the same problem as Bryan i am using windows
Thanks matt

On Mar 7, 2016, at 11:07 PM, Mobeen Iqbal <mobeeniqbal@xxxxxxxxx> wrote:

Hi brian.
Its very strange, the file extracted without problems at this end. Are you 
using windows or linux? You could always stick .img on the end of the file 
name and see if that works? What's the size of your extracted file?

Cheers,,

Mo.


Bryan Duarte <bjduarte@xxxxxxx> wrote:

Jacob,
I downloaded your ubuntu mate and it was compressed with 7zip. I
downloaded 7zip and when it was extracted there was no file extension
associated with the document. I figured it would be ok to use dd on my
Unix machine to write the file but it is not working for some reason.
Is there something I am missing?

Go Devils!

Bryan Duarte
ASU Software Engineering Graduate Student
QwikEyes CEO



On Feb 29, 2016, at 10:30 PM, jacob Kruger <jacob@xxxxxxxxxxxxx>
wrote:

Well, here's the page's contents:
---start---
Crackle-free audio on the Raspberry Pi with mpd and PulseAudio

The Raspberry Pi single-board computer is a wonderful little machine.

Sadly, its audio output is a bit riddled with software problems and
produces crackling and popping noises. In this article I�ll explain
how
to configure your Pi to get crackle-free audio playback on Raspbian
Linux with mpd and PulseAudio.


My Raspberry Pi
Update: The problem seems to be fixed, please read below.

Update: If you�re still having problems with the latest firmware,
please
read below.


The problem

While the Raspberry Pi is a wonderful little machine for
experimentation
and buying it is good for your karma1 it has � at least with the
current
346337 firmware and Raspbian Linux 3.2.272 � an audio playback
problem:


Starting and stopping playback creates strange (and loud) crackling
and
popping noises on the analog audio output.

This makes the Pi almost unusable for certain audio playback tasks.
For
example, I�m using the Raspberry Pi to build an internet radio and I
can�t stand the noise that appears everytime I switch stations.
Luckily,
a relatively simple fix for this problem exists that I�m going to
explain to you now.


The fix

To fix the audio problems we use the mpd audio player for playback
and
configure it to use PulseAudio as its audio backend. Additionally,
we�ll
tell PulseAudio to never let the audio hardware go to sleep. This
gives
us crackling and popping-free audio playback on Raspbian 3.2.27 and
firmware 346337. This guide assumes that you�ve already setup mpd
correctly4. Before I explain the steps to apply the fix I�ll give a
brief introduction to mpd and PulseAudio.

Music Player Daemon (mpd) is a minimalistic audio player that runs
well
even on weak hardware. A plain installation of mpd comes without a
graphical user interface. Instead, you control mpd with simple
text-based commands such as play, pause, or setvol 85. Mpd runs as a
background service that handles audio playback, remote streaming, and

playlists. It�s quite resource efficient and therefore runs nicely on

the Rasbperry Pi.

PulseAudio is a sound system for Linux � this means that it works as
a
proxy between your audio hardware and programs that want to play
sounds.
It also supports advanced functionality, such as routing audio from
one
machine to another. But how does using PulseAudio fix the Pi�s buggy
audio output? PulseAudio can be configured to never suspend the audio

device it is writing to � even if no audio is playing. Normally, this
is
a disadvantage as the suspend mode sends the audio hardware to sleep
to
save power. On the Raspberry Pi the crackling and popping audio
problems
seem to appear when the audio hardware goes to sleep or wakes up
again.
Disallowing the audio hardware to sleep therefore fixes the audio
problems.

To apply the fix follow these steps:
1.Install PulseAudio by running sudo apt-get install pulseaudio
2.Configure mpd to use PulseAudio as output plugin by editing
/etc/mpd.conf. You need to remove or comment out the lines that refer
to
the Alsa output plugin and add these lines instead:

audio_output {
  type   "pulse"
  name   "MPD PulseAudio Output"
}

3.Edit /etc/pulse/default.pa and remove or comment out load-module
module-suspend-on-idle. This is the important part that prevents
PulseAudio from sending the audio hardware to sleep. I�ve read that
simply using PulseAudio lessened the problem for some people. But on
my
Pi only disabling idle suspend really helped.
4.Restart PulseAudio and mpd to let the configuration changes take
effect. You do this by running the following two commands:

sudo /etc/init.d/pulseaudio restart
sudo /etc/init.d/mpd restart


These steps completely fix the audio crackles and pops with mpd on my

512 MB Model B Raspberry Pi. I can issue mpc pause and mpc play all
day
long without hearing any crackling noise.


More information

Here are other web sites and forums that also discuss the Raspberry
Pi
�crackling noise� audio problem:
� Issue #128 of raspberrypi/linux on GitHub This is the official bug
report where software solutions and interim fixes are discussed. It�s

likely that this problem will be fixed in a future firmware or driver

update.
� Corresponding thread in the official Raspberry Pi forums Several
fixes
for the audio problem are discussed here. This is where I got the
initial idea to use PulseAudio from.
� Issue #175 of xbianonpi/xbian on GitHub Xbian is a Linux
distribution
for the Pi that is aimed at media center use. It exhibits the same
audio
problems as Raspbian. This bug report also discusses various ideas
for
fixing the problem.
� Eben Upton�s message to the ALSA development mailing list The
founder
of the Raspberry Pi Foundation, Eben Upton, seems to be aware of the
Pi�s audio problem. He says that the Foundation wants to hire ALSA
developers to solve the problem. This is really good news.

Some mpd users also suggested that the mpd pipe output plugin should
be
used in combination with afplay. For me this didn�t work as afplay
also
disables the audio device when it is idle, thus leading to the same
crackling noises. The only thing that helped in my case was to use
mpd
in together with PulseAudio, as described here.


Update: The problem seems to be fixed

According to this comment on the GitHub issue the problem seems to
have been fixed or at least mitigated in a recent firmware update.
I�m
now using firmware 380831 that I installed via rpi-update. Firmware
commit 779f0fb specifically targets the crackling noise problem.
Updating the firmware prevents any noticeable crackling on my Pi and
I�ve switched back to using the Alsa output plugin for mpd. This
means
that with a properly updated firmware you very likely do not have to
use
the PulseAudio workaround anymore.

I�ve followed these steps to update my Pi�s firmware:

# Update all Raspbian packages.
# Do this *before* the firmware update.
sudo apt-get update
sudo apt-get upgrade

# Install rpi-update as described at
https://github.com/Hexxeh/rpi-update
sudo apt-get install git-core
sudo wget https://raw.github.com/Hexxeh/rpi-update/master/rpi-update
-O
/usr/bin/rpi-update
sudo chmod +x /usr/bin/rpi-update

# Backup the existing firmware.
sudo cp /boot/start.elf /boot/start.elf.knowngood

# Update to the latest firmware and activate it.
sudo rpi-update
sudo reboot



Update: Alternative solution

Ralf Goecke sent me an email where he mentioned that the crackling
came back with newer firmwares and modules 3.18.6. However he�s found

another workaround that involves disabling �timer-based audio
scheduling� in PulseAudio.

You can give this a shot by making a change to /etc/pulse/default.pa
and
adding the tsched=0 parameter:

### Automatically load driver modules depending on the hardware
available
.ifexists module-udev-detect.so
load-module module-udev-detect tsched=0
---end---


Jacob Kruger
Blind Biker
Skype: BlindZA
"Roger Wilco wants to welcome you...to the space janitor's closet..."

On 2016-03-01 12:33 AM, Travis Siegel wrote:
I use mpc/mpd for playing my internet channels, including the
blindy.tv
feeds, and there's no problems at all, I've never had any problems
with
crackle or anything else.  I also use mpg123 and omxplayer for my
playback
of other files (not streams) and I've never had any sort of crackle
over
the speakers while playing audio.  Having never experienced this
issue, I
don't know what is being talked about, but if it has anything to do
with
the reason we can't get orca working on the pi, this article may be
a way
to resolve the issue.


On Mon, 29 Feb 2016, jacob Kruger wrote:

While have just scanned through this article a little bit, it
mentions
an audio/media playback package called MPD - media playback daemon,
or
something like that - and a form of audio output proxy called
pulse, and
the whole thing relates to working around low-level audio hardware,
etc.
on the pi:
http://tinyurl.com/pg4s8ox

Jacob Kruger
Blind Biker
Skype: BlindZA
"Roger Wilco wants to welcome you...to the space janitor's
closet..."
===========================================================
The raspberry-vi mailing list
Archives: //www.freelists.org/archives/raspberry-vi
Administrative contact: <mike.ray@xxxxxxxxxxxxxx>
-----------------------------------------------------------
Raspberry Pi and the Raspberry Pi logo are trademarks of the
Raspberry Pi Foundation.

This list is not affiliated to the Raspberry Pi Foundation and the
views and attitudes expressed by the subscribers to this list do not
reflect those of the Foundation.

Mike Ray, list creator, January 2013
===========================================================
The raspberry-vi mailing list
Archives: //www.freelists.org/archives/raspberry-vi
Administrative contact: <mike.ray@xxxxxxxxxxxxxx>
-----------------------------------------------------------
Raspberry Pi and the Raspberry Pi logo are trademarks of the
Raspberry Pi Foundation.

This list is not affiliated to the Raspberry Pi Foundation and the
views and attitudes expressed by the subscribers to this list do not
reflect those of the Foundation.

Mike Ray, list creator, January 2013
===========================================================
The raspberry-vi mailing list
Archives: //www.freelists.org/archives/raspberry-vi
Administrative contact: <mike.ray@xxxxxxxxxxxxxx>
-----------------------------------------------------------
Raspberry Pi and the Raspberry Pi logo are trademarks of the
Raspberry Pi Foundation.

This list is not affiliated to the Raspberry Pi Foundation and the
views and attitudes expressed by the subscribers to this list do not
reflect those of the Foundation.

Mike Ray, list creator, January 2013


===========================================================
The raspberry-vi mailing list
Archives: //www.freelists.org/archives/raspberry-vi
Administrative contact: <mike.ray@xxxxxxxxxxxxxx>
-----------------------------------------------------------
Raspberry Pi and the Raspberry Pi logo are trademarks of the Raspberry
Pi Foundation.

This list is not affiliated to the Raspberry Pi Foundation and the
views and attitudes expressed by the subscribers to this list do not
reflect those of the Foundation.

Mike Ray, list creator, January 2013


===========================================================
The raspberry-vi mailing list
Archives: //www.freelists.org/archives/raspberry-vi
Administrative contact: <mike.ray@xxxxxxxxxxxxxx>
-----------------------------------------------------------
Raspberry Pi and the Raspberry Pi logo are trademarks of the Raspberry Pi 
Foundation.

This list is not affiliated to the Raspberry Pi Foundation and the views and 
attitudes expressed by the subscribers to this list do not reflect those of 
the Foundation.

Mike Ray, list creator, January 2013

===========================================================
The raspberry-vi mailing list
Archives: //www.freelists.org/archives/raspberry-vi
Administrative contact: <mike.ray@xxxxxxxxxxxxxx>
-----------------------------------------------------------
Raspberry Pi and the Raspberry Pi logo are trademarks of the Raspberry Pi 
Foundation.

This list is not affiliated to the Raspberry Pi Foundation and the views and 
attitudes expressed by the subscribers to this list do not reflect those of 
the Foundation.

Mike Ray, list creator, January 2013



=========================================================== 
The raspberry-vi mailing list 
Archives: //www.freelists.org/archives/raspberry-vi
Administrative contact: <mike.ray@xxxxxxxxxxxxxx>
-----------------------------------------------------------
Raspberry Pi and the Raspberry Pi logo are trademarks of the Raspberry Pi 
Foundation.

This list is not affiliated to the Raspberry Pi Foundation and the views and 
attitudes expressed by the subscribers to this list do not reflect those of the 
Foundation.

Mike Ray, list creator, January 2013

Other related posts: