Home of the Squeezebox™ & Transporter® network music players.
Page 1 of 6 123 ... LastLast
Results 1 to 10 of 58
  1. #1

    WaveInput Setup Troubles

    Hey there,

    I am having issues using the WaveInput plugin on my Raspberry Pi unit. For background information, I currently have two RPis (both with Wolfson sound cards) set up for audio playback. One of the units has LMS installed on it and both have squeezelite player installed. I can have both players simultaneously play a flac file from the server with no gaps or sound issues. Local recording and playback (with arecord, aplay, or vlc) works on both units. Also, I can listen to an input from line in by piping arecord to aplay. However, I have to close squeezelite on whichever RPi I want to use arecord, aplay, or vlc with (they complain that the device is busy).

    Now, for the problem. I wish to take the linein input to the Wolfson card and play that back on the server as well as the client RPi. I got the WaveInput plugin through the LMS plugins section, added the URL "wavin:default" to my favorites, played a song locally with vlc on the server, and tried to select the URL in my favorites on my Squeeze Android app. However, when I press play, the button will flash from pause to play in an instant, and I won't get any audio out on the client Pi. I tried switching the URL to "wavin:hw:0" (this is how I specify my Wolfson card when I use arecord) and playing from the LMS webpage, but I get the same results for both. I read through most of the WaveInput Linux main discussion thread, but I couldn't find something that could help me (or that was clear enough to me). Does anyone have an idea of how to get playback running with this plugin. I am a beginner with Linux. Any help is appreciated.

    Cheers,

    Michael

  2. #2
    Senior Member
    Join Date
    Oct 2005
    Location
    Ireland
    Posts
    17,990
    What Linux distro ?
    Do you have Pulseaudio ?
    How is LMS run as a service or a process under a user login ?
    Does the LMS user id have permissions to access the audio device ?

  3. #3
    Hey bpa,

    Thanks for getting back to me. My Pi's are running on Raspbian with Wolfson kernels. I never installed pulseaudio myself. There is a folder called "pulse" in /etc, but I'm not sure if that means that this version of Raspbian came with pulseaudio. I just installed LMS 7.8.0 from the repository at slimdevices and it runs at startup. I believe it's running as a service (since I can use "sudo service logitechmediaserver stop" to stop it. I don't know if my user id has permission to access the audio device. Is there a way to determine this?

    Cheers,

    Michael

  4. #4
    Senior Member
    Join Date
    Oct 2005
    Location
    Ireland
    Posts
    17,990
    I think you have Pulseaudio which can cause problem for WaveInput but probably not if using the Wolfson line-in.

    You need to check arecord recoding the Wolfson line-in running as the user which LMS uses. When LMS is running do a "ps" command and find the user name which is running LMS. Then run arecord using a "sudo -u <username>" this does a basic check on whether the LMS would be able to access the audio device.

  5. #5
    Hey bpa,

    As far as I can tell from the command line, user "107" is running LMS. I tried using arecord, and it says it doesnt recognize user 107. I have attached a screenshot of the results.

    Name:  Pi output.png
Views: 654
Size:  122.1 KB

    Cheers,

    Michael

  6. #6
    Senior Member
    Join Date
    Oct 2005
    Location
    Ireland
    Posts
    17,990
    Looks like installation didn't go properly as no user name has been associated with the user id 107.

    To use a user id instead of a name with sudo prefix number with # (i.e. sudo -u #107 arecord ...)

  7. #7
    Ok, so.

    Due to the fact that I accidentally broke Perl trying to find ways to fix the problem, I decided to flash my SD card again and install LMS and squeezelite again. While installing it, I realized that 107 was the user ID for the username "squeezeboxserver" which LMS created as a user upon installation. So I guess LMS runs under this username/ID. I read into problems with permissions with LMS and changed the permissions for the WaveInput plugin (located at /var/lib/squeezeboxserver/cache/InstalledPlugins/Plugins) via the instructions on this page but nothing changed. I then decided to add this new user (squeezeboxserver) to the audio group via a "sudo usermod -a -G audio squeezeboxserver" command.

    To test this next change, I played a local .flac file which played fine on the server machine. Then, I chose the wavin:default I had put under favorites. Then, it sounded like the playback on the server machine became corrupted (the sound played quieter, there were pops, and overall it sounded like the song went through a very poor recorder). Also, I waited more than 30 seconds and got nothing out of the client unit. Once I killed the cvlc playback and started another one, the sound returned to normal. This happened every time I tried to use the WaveInput plugin. I tried changing "default" to "hw:0" in the URL and also tried installing ecasound and using the eca custom-convert.conf file, with the same results. I can still use LMS to stream files on the server to the client with no troubles. Any ideas?

    Thanks,

    Michael

  8. #8
    Senior Member
    Join Date
    Oct 2005
    Location
    Ireland
    Posts
    17,990
    I think you have now run into Pulseaudio. I'm not a fan of PulseAudio - others have no problems with it.

    I have found Pulseaudio can solve problems I never have and causes problems with what I want to do. So on my Linux boxes I have given upon Pulseaudio and install ALSA.

    To get WaveInput working on your setup, you first need to just get an "arecord" command line that can record the audio from your speakers into a wav format file. Don't have LMS or ecasound running. It will be probable to do with Pulseaudio configuration (e.g. pavucontrol). My guess is that either Pulse or Alsa are doing mixing of inputs such as from your audio app, other apps and/or line-in, mic in. The audio sources will not be at 100% so volume may be reduced and line-in-mic can introduce noise.

  9. #9
    Awesome. I'll go give these a try now. Thanks.

  10. #10
    Senior Member
    Join Date
    Oct 2005
    Location
    Ireland
    Posts
    17,990
    In The waveinput plugn thread some other have posted solution using Pulseaudio on other lnux box.

    1. Convert audio to a httpmp3 stream and then play audio direct just like a normal stream
    see http://forums.slimdevices.com/showth...l=1#post766290

    2. Using parecord

    http://forums.slimdevices.com/showth...l=1#post774712

    There may be other solution in the WaveInput plugin thread.

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •