• These commercial threads are for private transactions. diyAudio.com provides these forums for the convenience of our members, but makes no warranty nor assumes any responsibility. We do not vet any members, use of this facility is at your own risk. Customers can post any issues in those threads as long as it is done in a civil manner. All diyAudio rules about conduct apply and will be enforced.

Ian asynchronous I2S and S/PDIF FIFO KIT group buy

volumio has a plugins for Spotify that Spotify's stream music can play via ian's fifo. However, Spotify seems to be a stand-alone player, and it will not use volumio's resampler so it can not able to up-resampler to 24 bits and all become noise. Anyone know how to solve it?

Volumio 2 Plugins Collection : Development talks

Thanks cyrilliu for your update. That great!

Can I have some details? I'm interested in this configuration.

Regards,
Ian
 
Thanks cyrilliu for your update. That great!

Can I have some details? I'm interested in this configuration.

Regards,
Ian

Spotify plusin does not provide settings, only the high quality can be on or off.

FC8X9PZJ95OUWFT.MEDIUM.jpg
 
Thanks cyrillu,

How to install? Do you have links for guidance?

Regards,
Ian

I have always failed to installing Spotify before. Now, just click the install button, you can complete the installation. But you have to use Spotify's premium account to login. Otherwise it will not show Spofty's options on Volumio's browse.

Spotify Jukebox : 7 Steps (with Pictures)
 
Last edited:
I have always failed to installing Spotify before. Now, just click the install button, you can complete the installation. But you have to use Spotify's premium account to login. Otherwise it will not show Spofty's options on Volumio's browse.

Spotify Jukebox : 7 Steps (with Pictures)

Thank you so much. That's very helpful.

Regards,
Ian
 
volumio has a plugins for Spotify that Spotify's stream music can play via ian's fifo. However, Spotify seems to be a stand-alone player, and it will not use volumio's resampler so it can not able to up-resampler to 24 bits and all become noise. Anyone know how to solve it?

Volumio 2 Plugins Collection : Development talks

Read up on how to setup an .asoundrc file to tell ALSA to always upsample to 24 bit. Just make sure you run the Spotify process with another user so that Volumio won't be affected.
 
Read up on how to setup an .asoundrc file to tell ALSA to always upsample to 24 bit. Just make sure you run the Spotify process with another user so that Volumio won't be affected.

Thanks!

I found this:

Alsa by default uses the same sampling rate and format as the source. It is however possible to force the sample rate up (or down).

Here is one way you could do it. (in /etc/asound.conf or ~/.asoundrc)

pcm.device{
format S24_LE
rate 96000
type hw
card 0
device 0
}

ubuntu - Change sampling rate in ALSA - Unix & Linux Stack Exchange
 
Read up on how to setup an .asoundrc file to tell ALSA to always upsample to 24 bit. Just make sure you run the Spotify process with another user so that Volumio won't be affected.

I found the same description in /etc/asound.conf or ~/.asoundrc as the bottom, but I do not know how to modify for resampling up to 24bits. I have tried to add "format S32_LE", the result has no effect at all.

If you delete these descriptions, it can not play. These descriptions are meaningful.

pcm.spotoutf
{
type dmix
slave {
pcm hw:1
rate 44100
}
ipc_key 1024
}
pcm.spotout
{
type plug
slave.pcm spotoutf
}

defaults.pcm.rate_converter "speexrate_high"
 
If you want to upsample to 24bit try this:

Code:
pcm.spotoutf {
    type dmix
    slave {
        pcm hw:1
        rate 44100
        format S24_LE
    }
    ipc_key 1024
}

pcm.spotout {
    type plug
    slave.pcm spotoutf
}

defaults.pcm.rate_converter "speexrate_high"

I have already tried it before, but it has no effect. Even if I set upsample to 96000, it has no effect. I have also modified both of asoundrc and /etc/asound.conf .
 
I assume you've restarted after the asound.conf changes? If so, put back the format S24_LE option as I suggested, restart again and check the output of
Code:
cat /proc/asound/card1/pcm0p/sub0/hw_params
when playing spotify and compare to the output when playing something that works. Maybe s24_le is not the correct format.
Also, check what user spotify runs as and go to that user's home directory to find the .asoundrc file if present - does that have the same pcm.spotoutf block? If so that is what you need to edit and restart.
 
I assume you've restarted after the asound.conf changes? If so, put back the format S24_LE option as I suggested, restart again and check the output of
Code:
cat /proc/asound/card1/pcm0p/sub0/hw_params
when playing spotify and compare to the output when playing something that works. Maybe s24_le is not the correct format.
Also, check what user spotify runs as and go to that user's home directory to find the .asoundrc file if present - does that have the same pcm.spotoutf block? If so that is what you need to edit and restart.

There is only one user volumio which .asoundrc file is in his home directory, and asound.conf has the same pcm.spotoutf block.

"find .asoundrc" can find only one .asoundrc file.

When playing volumio, it is shown that:

Code:
volumio@volumio:~$  cat /proc/asound/card1/pcm0p/sub0/hw_params
access: RW_INTERLEAVED
format: S24_LE
subformat: STD
channels: 2
rate: 44100 (44100/1)
period_size: 4410
buffer_size: 22050

When playing spotify, it is shown that:

Code:
volumio@volumio:~$ cat /proc/asound/card1/pcm0p/sub0/hw_params
access: RW_INTERLEAVED
format: S16_LE
subformat: STD
channels: 2
rate: 44100 (44100/1)
period_size: 2048
buffer_size: 16384
 
Last edited:
After I turn off the volumio's resample function:

when playing volumio, it is shown that:

Code:
volumio@volumio:~$  cat /proc/asound/card1/pcm0p/sub0/hw_params
access: RW_INTERLEAVED
format: S16_LE
subformat: STD
channels: 2
rate: 44100 (44100/1)
period_size: 4410
buffer_size: 22050

when playing spotify, it is shown that:
Code:
volumio@volumio:~$ cat /proc/asound/card1/pcm0p/sub0/hw_params
access: RW_INTERLEAVED
format: S16_LE
subformat: STD
channels: 2
rate: 44100 (44100/1)
period_size: 2048
buffer_size: 16384

That means spotify directly outputs the sound through alsa with 16/44100. It's for copyright considerations?
 
Last edited:
So you edited both files and restarted, correct? When running Spotify, can you do "ps -ef|grep spot" and see if you get the full command line, maybe some parameters are passed there that force the bit rate or it is not using the spotout device. Also try to change hw:1 to plughw:1 in both files.
 
Yes, I have restarted after edited the file.

When running Spotify:

Code:
volumio@volumio:~$ ps -ef|grep spot
volumio   1025     1  0 11:21 ?        00:00:00 /bin/bash /data/plugins/music_service/volspotconnect2/startconnect.sh
volumio   1029  1025  0 11:21 ?        00:00:10 ./librespot -b 320 -c /tmp --name Volumio --backend alsa --device plughw:1 --disable-audio-cache --onstart ./onstart1.sh
volumio   4116  1179  0 12:03 pts/0    00:00:00 grep spot
 
Yep, there is the problem: --device plughw:1
it needs to be spotout
looks like volspotconnect2 doesn't have the logic to use spotout.
You can try and edit /data/plugins/music_service/volspotconnect2/index.js and change the line
Code:
var conf3 = conf2.replace("${outdev}", hwdev);
to
Code:
var conf3 = conf2.replace("${outdev}", "spotout");
save and restart volumio.