A Audio, hi-fi and car audio  forum. Audio Banter

Go Back   Home » Audio Banter forum » UK Audio Newsgroups » uk.rec.audio (General Audio and Hi-Fi)
Site Map Home Register Authors List Search Today's Posts Mark Forums Read Web Partners

uk.rec.audio (General Audio and Hi-Fi) (uk.rec.audio) Discussion and exchange of hi-fi audio equipment.

Audio over wifi


« Push vs pull | test »

 
 
LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old June 22nd 16, 02:11 PM posted to uk.rec.audio
Richard Robinson
external usenet poster
 
Posts: 102
Default Audio over wifi


Hello. I'm baffled and looking for help.

I've been trying to play audio over my home wifi :- the backend is a
raspbery pi sending audio out via USB into a DAC, the frontend is a laptop
running Debian 8, sending to a pulseaudio "SMC9514 hub digital stereo
(IEC958) on pi@raspberypi" sink (I find pulseaudio deeply obscure and
offputting, but I haven't found much else that offers the possibility of
doing this at all). This connects, to the extent of getting a noise out of
the speakers, but the sound is useless - broken up, stuttering, as much
silence than sound - it gives the impression that the data's just not being
sent fast enough.

Wifi-wise, the pi is the bottleneck, with 'iwconfig wlan0' giving "Bit
Rate=54 Mb/s" (the rest of the system could go faster). But handwavingly,
this is ~5megabytes/sec, CD-quality sound is ~10megabytes/min, so I'd have
expected that to be plenty.

(I've tried wav and a highly-compressed mp3, doesn't seem to make much
difference, I'm guessing it's decompressed before sending ? But it wouldn't
help anyway, having a DAC and cheap storage I don't want to use a lossy
format).

So what am I missing ? Is there some deep reason why this won't work, am I
doing something stupid, what's going on ?

TIA.

--
Richard Robinson
"The whole plan hinged upon the natural curiosity of potatoes" - S. Lem

My email address is at http://www.qualmograph.org.uk/contact.html
  #2 (permalink)  
Old June 23rd 16, 11:34 AM posted to uk.rec.audio
Jim Lesurf[_2_]
external usenet poster
 
Posts: 2,668
Default Audio over wifi

In article , Richard
Robinson wrote:

Hello. I'm baffled and looking for help.


I've been trying to play audio over my home wifi :- the backend is a
raspbery pi sending audio out via USB into a DAC, the frontend is a
laptop running Debian 8, sending to a pulseaudio "SMC9514 hub digital
stereo (IEC958) on pi@raspberypi" sink (I find pulseaudio deeply obscure
and offputting, but I haven't found much else that offers the
possibility of doing this at all). This connects, to the extent of
getting a noise out of the speakers, but the sound is useless - broken
up, stuttering, as much silence than sound - it gives the impression
that the data's just not being sent fast enough.


I can't comment in detail on the wifi beyond suspecting the obvious, that
it might be slow.

But if you want audio quality you might find you prefer using ALSA.

aplay -L

will list playout devices. I'd hope your system can then find the required
device. Usually Pulse will send out via ALSA anyway.

Jim

--
Please use the address on the audiomisc page if you wish to email me.
Electronics http://www.st-and.ac.uk/~www_pa/Scot...o/electron.htm
Armstrong Audio http://www.audiomisc.co.uk/Armstrong/armstrong.html
Audio Misc http://www.audiomisc.co.uk/index.html

  #3 (permalink)  
Old June 30th 16, 12:09 AM posted to uk.rec.audio
Richard Robinson
external usenet poster
 
Posts: 102
Default Audio over wifi

Jim Lesurf said:
In article , Richard
Robinson wrote:

Hello. I'm baffled and looking for help.
I've been trying to play audio over my home wifi

...
But if you want audio quality you might find you prefer using ALSA.

aplay -L

will list playout devices. I'd hope your system can then find the required
device. Usually Pulse will send out via ALSA anyway.


Thanks, but ... I _think_ I've ended up telling alsa to go out via pulse. I
do not like configuring linux sound. I never have, and it doesn't seem to
have got any more comprehensible since the last time I looked ... I seem to
have something that works and that'll do for now. I may find more tuits for
it later.


--
Richard Robinson
"The whole plan hinged upon the natural curiosity of potatoes" - S. Lem

My email address is at http://www.qualmograph.org.uk/contact.html
  #4 (permalink)  
Old June 30th 16, 08:30 AM posted to uk.rec.audio
Jim Lesurf[_2_]
external usenet poster
 
Posts: 2,668
Default Audio over wifi

In article ,
Richard
Robinson wrote:
Jim Lesurf said:
In article ,
Richard Robinson wrote:

Hello. I'm baffled and looking for help. I've been trying to play
audio over my home wifi

... But if you want audio quality you might find you prefer using ALSA.

aplay -L

will list playout devices. I'd hope your system can then find the
required device. Usually Pulse will send out via ALSA anyway.


Thanks, but ... I _think_ I've ended up telling alsa to go out via
pulse. I do not like configuring linux sound. I never have, and it
doesn't seem to have got any more comprehensible since the last time I
looked ... I seem to have something that works and that'll do for now. I
may find more tuits for it later.


OK, that's fine if it is working correctly. Although I suspect in practice
Pulse is actually then sending out via ALSA as it tends to sit 'on top' of
it. If you want quality, though, check that the output sample rate reaching
the *playing hardware* is following the rate of the source material. Pulse
has a habit of mangling everything into 48k sample rate.

TBH setting up ALSA is usually pretty simply for playout. The problem is
generally the lack of documentation. But for future reference there are
pages on my Audiomisc site that explain how to set up ALSA for quality
audio replay. The hardest bit can be stopping Pulse from then 'nannying'
you and changing what you set.

Jim

--
Please use the address on the audiomisc page if you wish to email me.
Electronics http://www.st-and.ac.uk/~www_pa/Scot...o/electron.htm
Armstrong Audio http://www.audiomisc.co.uk/Armstrong/armstrong.html
Audio Misc http://www.audiomisc.co.uk/index.html

  #5 (permalink)  
Old July 1st 16, 10:17 AM posted to uk.rec.audio
Richard Robinson
external usenet poster
 
Posts: 102
Default Audio over wifi

Jim Lesurf said:
In article ,
Richard Robinson wrote:
Jim Lesurf said:
In article ,
Richard Robinson wrote:

Hello. I'm baffled and looking for help. I've been trying to play
audio over my home wifi
... But if you want audio quality you might find you prefer using ALSA.

aplay -L

will list playout devices. I'd hope your system can then find the
required device. Usually Pulse will send out via ALSA anyway.


Thanks, but ... I _think_ I've ended up telling alsa to go out via
pulse. I do not like configuring linux sound. I never have, and it
doesn't seem to have got any more comprehensible since the last time I
looked ... I seem to have something that works and that'll do for now. I
may find more tuits for it later.


OK, that's fine if it is working correctly. Although I suspect in practice
Pulse is actually then sending out via ALSA as it tends to sit 'on top' of
it. If you want quality, though, check that the output sample rate reaching
the *playing hardware* is following the rate of the source material. Pulse
has a habit of mangling everything into 48k sample rate.

TBH setting up ALSA is usually pretty simply for playout. The problem is
generally the lack of documentation. But for future reference there are
pages on my Audiomisc site that explain how to set up ALSA for quality
audio replay. The hardest bit can be stopping Pulse from then 'nannying'
you and changing what you set.


I have had trouble with ALSA/Pulse (I've never got on with linux audio
backends, it's one of my least favourite things about it). I've been
fiddling intermittently with this for a while and not getting it right, it's
likely I've got some odd configurations hanging around as a result. Pulse
insisted on coming into the mix because it seemed to offer the possibility
of doing what I first thought of, pushing audio from the client machine. Now
I see that that doesn't work, I'd probably do best to wipe the raspberry and
set it up again from a clean start; at which point I'll bear that in mind.

Thanks.

The DAC has a little row of lights showing the incoming sample rate. I just
set something playing and had a look ... none of them are lit up. Helpful,
no ? :-/


--
Richard Robinson
"The whole plan hinged upon the natural curiosity of potatoes" - S. Lem

My email address is at http://www.qualmograph.org.uk/contact.html
  #6 (permalink)  
Old July 2nd 16, 08:43 AM posted to uk.rec.audio
Jim Lesurf[_2_]
external usenet poster
 
Posts: 2,668
Default Audio over wifi

In article ,
Richard
Robinson wrote:

The DAC has a little row of lights showing the incoming sample rate. I
just set something playing and had a look ... none of them are lit up.
Helpful, no ? :-/


Afraid I've forgotten what kind of DAC you're using, so can only guess.

However it is possible that the DAC is fussy about the rate. So if the
playout is running too fast or too slow (or is too erratic) the LED doesn't
light up.

You can read a 'file' for each device and - when audio is playing - the
relevant one will state the rate, etc, being sent out to hardware. My
memory being what it is I can't immediately recall the 'file' names for
this. But if no-one else can say I'll find out and let you know later on.
[ Edit: see below :-) ]

If you're using -aplay you can use this to probe what works

get a list of devices from 'aplay -l'

then try 'aplay -D hw:one of them file.wav' to see if that will
play the file and give you a coconut. Using 'hw:' tells -aplay
to *not* provide any conversions. So it will only play when the
device can accept the rate and bit-depth of the wave file.

You can use sox to generate versions of a wave file with various
rates and bit depths.


Edit: Found how to check the output in my notebooks

look at files like /proc/asound/cardn/pcmmp/subp/hw_params

and cat their content to see what they hold *while you play
some audio*. Each file will report what's happening for a given
card, etc. If you hear music, the relevant one will report the
rate that is being used.

Jim

--
Please use the address on the audiomisc page if you wish to email me.
Electronics http://www.st-and.ac.uk/~www_pa/Scot...o/electron.htm
Armstrong Audio http://www.audiomisc.co.uk/Armstrong/armstrong.html
Audio Misc http://www.audiomisc.co.uk/index.html

  #7 (permalink)  
Old July 1st 16, 11:11 AM posted to uk.rec.audio
Richard Robinson
external usenet poster
 
Posts: 102
Default Audio over wifi

Huge said:
On 2016-07-01, Richard Robinson wrote:
Jim Lesurf said:
In article ,


[47 lines snipped]

How done with it and buy a Squeezebox or two on eBay. Like wot I did.


Squeezebox ? Nah, clarinet's my instrument.

[ ;-) ]


--
Richard Robinson
"The whole plan hinged upon the natural curiosity of potatoes" - S. Lem

My email address is at http://www.qualmograph.org.uk/contact.html
  #8 (permalink)  
Old July 6th 16, 12:58 PM posted to uk.rec.audio
Richard Robinson
external usenet poster
 
Posts: 102
Default Audio over wifi

Jim Lesurf said:
...
TBH setting up ALSA is usually pretty simply for playout. The problem is
generally the lack of documentation. But for future reference there are
pages on my Audiomisc site that explain how to set up ALSA for quality
audio replay. The hardest bit can be stopping Pulse from then 'nannying'
you and changing what you set.


I've just had a quick read of
http://www.audiomisc.co.uk/Linux/ALSA/ALSAforUsers.html

and it looks like just what I was needing (including answering my question
about alsa names) ... I'll investigate later & see what happens. Thanks.


--
Richard Robinson
"The whole plan hinged upon the natural curiosity of potatoes" - S. Lem

My email address is at http://www.qualmograph.org.uk/contact.html
  #9 (permalink)  
Old July 6th 16, 08:55 PM posted to uk.rec.audio
Richard Robinson
external usenet poster
 
Posts: 102
Default Audio over wifi

Jim Lesurf said:

TBH setting up ALSA is usually pretty simply for playout. The problem is
generally the lack of documentation. But for future reference there are
pages on my Audiomisc site that explain how to set up ALSA for quality
audio replay. The hardest bit can be stopping Pulse from then 'nannying'
you and changing what you set.


Okay. With the help of your page + a bit of rejigging, it's getting close. I
realised I also needed a sound editor, so the sound files now live on a hard
disk plugged into the backend raspberrys; and alsa now recognises the DAC as
default, mpd plays, audacity sees the DAC directly and plays, all the other
usual players seem to find alsa and play, even amarok, which I was nervous
of.

Except that there is something up with samplerates, I'll follow that up to your
other post, later.


--
Richard Robinson
"The whole plan hinged upon the natural curiosity of potatoes" - S. Lem

My email address is at http://www.qualmograph.org.uk/contact.html
  #10 (permalink)  
Old June 23rd 16, 01:28 PM posted to uk.rec.audio
Richard Robinson
external usenet poster
 
Posts: 102
Default Audio over wifi

Bob Latham said:
In article ,
Richard Robinson wrote:

Hello. I'm baffled and looking for help.


I've been trying to play audio over my home wifi :- the backend is a
raspbery pi sending audio out via USB into a DAC, the frontend is a
laptop running Debian 8, sending to a pulseaudio "SMC9514 hub digital
stereo (IEC958) on pi@raspberypi" sink (I find pulseaudio deeply obscure
and offputting, but I haven't found much else that offers the
possibility of doing this at all). This connects, to the extent of
getting a noise out of the speakers, but the sound is useless - broken
up, stuttering, as much silence than sound - it gives the impression
that the data's just not being sent fast enough.


Wifi-wise, the pi is the bottleneck, with 'iwconfig wlan0' giving "Bit
Rate=54 Mb/s" (the rest of the system could go faster). But
handwavingly, this is ~5megabytes/sec, CD-quality sound is
~10megabytes/min, so I'd have expected that to be plenty.


(I've tried wav and a highly-compressed mp3, doesn't seem to make much
difference, I'm guessing it's decompressed before sending ? But it
wouldn't help anyway, having a DAC and cheap storage I don't want to use
a lossy format).


So what am I missing ? Is there some deep reason why this won't work, am
I doing something stupid, what's going on ?


As regards the rip format for music, unless you have extremely good
reasons for not doing so (I'm confident you haven't), use flac. Rip to


Thanks ... and, yes. New stuff comes in as flac. But ...

flac and get your tags sorted from the start rather have to come back
later and sort hundreds of albums.


.... I have a lot of 'historical' mp3s with no proper tagging, from the days
when storage was more of an issue. That's one reason why I'd prefer the
laptop hard disk to be my main storage, rather than put a hard disk behind
the raspbery pi - the laptop software/screen gives a nicer interface than
remotedestopping into the pi (I also have CDs to re-rip, which would be
easier that way). I could do the latter, if all else fails, but I want to
explore the alternative first, it'd just be a bit more convenient if I can
get it to work.

I'm not familiar with the kit you are using but FWIW here is my opinion.

My best guess is that you are trying to push music from a laptop to a
music renderer via wi-fi.


Yes.

I know many people push music via USB from a laptop directly into a dac


Yes. I've been doing that for a while, it works fine through a USB cable.
It's just that a cable stretched across the floor is not a good idea, sooner
or later I _will_ trip over it. I lost a nice pair of headphones that way
once; so wifi would be a better idea.

but I've never seen or heard of it being done with wi-fi in the link too.


I'm suprised; it seemed like the obvious next step, to me. Maybe I'm just
weird (shrug).

Personally, I've never liked the idea of 'push' music systems, it seems to
me that making sure the buffer in the renderer is neither overflowing or
empty is a bit tricky and far worse if you use wi-fi.

I advise using a pull system. The renderer pulls music from the server as
it requires it to keep the buffer just right. There are plenty of these
systems around.


Ah. That's a thing I hadn't taken seriously - I was guessing that given the
throughput numbers above, buffering wouldn't be an issue. Being proud of my
ability to be wrong, I will check out the idea of 'pull'.

To be clear, by a 'pull' system you mean that the music player software
lives on the machine that's wired into the amp (the pi, in my case) and it
sucks the music files down from a remote hard disk somewhere else on the
local network (the laptop, in my case) ?

Using flac I can stream hi-rez 192Khz/24bit music over wireless N all day
without an error but this does depend on how clear your local area is,
have you looked to see how many other wi-fi systems in your area are on
the same channel.


Ah, again. No, I hadn't, but will. I'm new to wifi in general, I've always
only done desktops/ethernet until I started playing with this stuff.

With pull systems, some pull from an SMB share on a PC or NAS eg. Sonos
and Bluesound and other systems pull from a UPnP server. Originally I
preferred the simplicity of the SMB connection but later I've seen the
advantage of UPnP, in particular there is only one central index no matter
how many clients/renderers. MinimServer is easy to setup - not a problem.

For your raspberry pi code Google OpenHome UPnP.


Thank you. This gives me some Things To Try Next.



I know others will not agree but that's life, not everyone will vote
"Leave" today either. :-)


Me, for example :-)




--
Richard Robinson
"The whole plan hinged upon the natural curiosity of potatoes" - S. Lem

My email address is at http://www.qualmograph.org.uk/contact.html
 



« Push vs pull | test »

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



All times are GMT. The time now is 10:50 PM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.SEO by vBSEO 3.0.0
Copyright ©2004-2025 Audio Banter.
The comments are property of their posters.