PDA

View Full Version : Squeezebox server line in



advancedcommil
2019-01-18, 08:45
Hey everyone really new to this and I have an application I need some help with hopefully I came to the right place. I am attempting to use squeezebox currently with max2play but feel I can figure it out without it to be able to have more control of my raspberry pi’s. Here is what I am currently doing. I have a raspberry pi b+ connected via lan to my home network running as the server currently connecting audio from my home theater to the server via Bluetooth, but the Bluetooth auto connecting properly is not reliable. I then have mulitple receivers - raspberry pi a+ with hifiberry dac+ connected to the network via WiFi. This is all working well using max2play audio is synced perfectly sounds great but the Bluetooth on the server side is just not 100 percent reliable.

What I am trying to do on the server side is install a hifiberry dac+ adc to use line in from my home theater to send to my receivers. I have tried setting up line in using both max2play in Lms as well as on a fresh raspbian install running lms with no luck. Does anyone have any ideas on a better way to do this with the most minimal delay? Just need for whatever I do to autorun on startup as I was not planning on having a display on these pi’s once set up. Any ideas or comments would be greatly appreciated. Have a great day! Thanks

Paul Webster
2019-01-18, 09:23
Are you trying to get the audio in into LMS for it to distribute to squeezebox players?
If yes - is this something that Max2Play does for you through its own special software or are you trying to use one of the LMS plugins - like WaveInput?

Basically - can you provide some more information about what you have tried to do and the results?

bpa
2019-01-18, 09:53
Does anyone have any ideas on a better way to do this with the most minimal delay?

Delay to set it up the various components or delay when playing betrweeninput and output.

In the second case what delays are you experiencing ?
There are tweaks that can be done they depend on how the "relay" has been implemented - one is sending audio uncompressed (i.e. PCM) to player. It will reduce delay but can make system more unreliable (especially if wireless is being used ) as opportunities for buffering are reduced .

advancedcommil
2019-01-18, 11:11
I have a Behringer uca222 that I tried to use as a line in on max2play (before I got a bluetooth dongle) I tried playing all the options for wavin and never found the stream any tips on what I need to do to make it work, I also have LMS installed in Raspian on another SD card and still couldn't get it to play

Paul Webster
2019-01-18, 11:24
See https://forums.slimdevices.com/showthread.php?109495-Streaming-Line-Audio&highlight=Behringer

bpa
2019-01-18, 12:59
I have a Behringer uca222 that I tried to use as a line in on max2play (before I got a bluetooth dongle) I tried playing all the options for wavin and never found the stream any tips on what I need to do to make it work, I also have LMS installed in Raspian on another SD card and still couldn't get it to play

First thing - make sure you can capture audio from the device using something like arecord. I don't know whether your raspbian is running ALSA or Pulseaudio - there can be a big difference in setup so understanding the basics and then providing full info is essential if you want help.

advancedcommil
2019-01-21, 15:04
First thing - make sure you can capture audio from the device using something like arecord. I don't know whether your raspbian is running ALSA or Pulseaudio - there can be a big difference in setup so understanding the basics and then providing full info is essential if you want help.

I was able to get a clip using arecord to playback with aplay, (I'm running Raspbian out of the box so I'm pretty sure that's ALSA) I went into "alsamixer" but the USB Audio Codec does not show capture, only playback

bpa
2019-01-21, 15:23
I was able to get a clip using arecord to playback with aplay, (I'm running Raspbian out of the box so I'm pretty sure that's ALSA) I went into "alsamixer" but the USB Audio Codec does not show capture, only playback

No capture devices were shown after pressing F4 ?

When you use arecord - what is displayed when you do "arecord -L" and "arecord -l" (lower case letter L)

advancedcommil
2019-01-23, 13:50
No capture devices were shown after pressing F4 ?

When you use arecord - what is displayed when you do "arecord -L" and "arecord -l" (lower case letter L)
Replaced the UCA with a HiFiBerry DAC+/ADC I now have capture showing in alsamixer. I was able to record and playback a new test file with arecord as well. Here is the output of arecord -l and arecord -L


pi@raspberrypi:~ $ arecord -l
**** List of CAPTURE Hardware Devices ****
card 0: sndrpihifiberry [snd_rpi_hifiberry_dacplusadc], device 0: HiFiBerry DAC+ADC HiFi multicodec-0 []
Subdevices: 1/1
Subdevice #0: subdevice #0
pi@raspberrypi:~ $ arecord -L
null
Discard all samples (playback) or generate zero samples (capture)
default:CARD=sndrpihifiberry
snd_rpi_hifiberry_dacplusadc,
Default Audio Device
sysdefault:CARD=sndrpihifiberry
snd_rpi_hifiberry_dacplusadc,
Default Audio Device
dmix:CARD=sndrpihifiberry,DEV=0
snd_rpi_hifiberry_dacplusadc,
Direct sample mixing device
dsnoop:CARD=sndrpihifiberry,DEV=0
snd_rpi_hifiberry_dacplusadc,
Direct sample snooping device
hw:CARD=sndrpihifiberry,DEV=0
snd_rpi_hifiberry_dacplusadc,
Direct hardware device without any conversions
plughw:CARD=sndrpihifiberry,DEV=0
snd_rpi_hifiberry_dacplusadc,
Hardware device with all software conversions

bpa
2019-01-23, 16:10
Replaced the UCA with a HiFiBerry DAC+/ADC I now have capture showing in alsamixer. I was able to record and playback a new test file with arecord as well. Here is the output of arecord -l and arecord -L

OK, Since you have managed to record CD quality (i.e. 44.1kHz 16bit) with "arecord" - making Wavinput work should be easy as it also uses "arecord".

Your test will have used the arecord "-D" option to select the capture device. (e.g. arecord -D plughw:CARD=sndrpihifiberry,DEV=0 -f cd -t wav test.wav )

Create a LMS favorite with a "wavin:" prefix to the ALSA device you know works for capture (e.g. wavin:plughw:CARD=sndrpihifiberry,DEV=0 )

Make sure the Username that runs LMS on your system is a member of the audio group (this may vary according to distro) so that it has permission to access audio hardware. If you had to add the username to the audio group - then restart system just to make sure user group changes take effect.

In LMS try to play the newly created "wavin" favorite .

kappclark
2019-01-24, 03:48
OK, Since you have managed to record CD quality (i.e. 44.1kHz 16bit) with "arecord" - making Wavinput work should be easy as it also uses "arecord".

Your test will have used the arecord "-D" option to select the capture device. (e.g. arecord -D plughw:CARD=sndrpihifiberry,DEV=0 -f cd -t wav test.wav )

Create a LMS favorite with a "wavin:" prefix to the ALSA device you know works for capture (e.g. wavin:plughw:CARD=sndrpihifiberry,DEV=0 )

Make sure the Username that runs LMS on your system is a member of the audio group (this may vary according to distro) so that it has permission to access audio hardware. If you had to add the username to the audio group - then restart system just to make sure user group changes take effect.

In LMS try to play the newly created "wavin" favorite .

FWIW - A while back, I used the same Behringer codec to record FM radio programming via line-in to the internal memory of the RPI, using arecord, with stream piped to lame... here is the code that worked:

arecord -D sysdefault:CARD=CODEC -f cd | lame -b 320 - /mnt/mmcblk0p2/fm/music320.mp3

Bill Clark, Windham VT

advancedcommil
2019-01-24, 13:37
OK, Since you have managed to record CD quality (i.e. 44.1kHz 16bit) with "arecord" - making Wavinput work should be easy as it also uses "arecord".

Your test will have used the arecord "-D" option to select the capture device. (e.g. arecord -D plughw:CARD=sndrpihifiberry,DEV=0 -f cd -t wav test.wav )

Create a LMS favorite with a "wavin:" prefix to the ALSA device you know works for capture (e.g. wavin:plughw:CARD=sndrpihifiberry,DEV=0 )

Make sure the Username that runs LMS on your system is a member of the audio group (this may vary according to distro) so that it has permission to access audio hardware. If you had to add the username to the audio group - then restart system just to make sure user group changes take effect.

In LMS try to play the newly created "wavin" favorite .

I added squeezeserver to the audio group, restarted and it took right off using the wavin address you mentioned... Thank you very much!!!! I'm assuming a 6 second delay is normal.

Also is there a script to autoplay a file on startup? And is there a way to synchronize all available players on startup as well? Sorry if I'm asking for too much, but this is awesome once again thank you