Go Back   Home > Forums > >
Home Forums Rules Articles diyAudio Store Blogs Gallery Wiki Register Donations FAQ Calendar Search Today's Posts Mark Forums Read

Group Buys Members group buys

Ian asynchronous I2S and S/PDIF FIFO KIT group buy
Ian asynchronous I2S and S/PDIF FIFO KIT group buy
Please consider donating to help us continue to serve you.

Ads on/off / Custom Title / More PMs / More album space / Advanced printing & mass image saving
Reply
 
Thread Tools Search this Thread
Old 16th December 2017, 09:58 AM   #2531
wealas is offline wealas
diyAudio Member
 
Join Date: Apr 2017
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"
  Reply With Quote
Old 17th December 2017, 04:17 AM   #2532
cyrilliu is offline cyrilliu  Taiwan
Banned
 
Join Date: Sep 2014
Location: Taipei City, Taiwan
Quote:
Originally Posted by wealas View Post
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 .
  Reply With Quote
Old 17th December 2017, 07:12 AM   #2533
cyrilliu is offline cyrilliu  Taiwan
Banned
 
Join Date: Sep 2014
Location: Taipei City, Taiwan
mopidy has a extension for spotify.

Mopidy
  Reply With Quote
Old 17th December 2017, 09:13 AM   #2534
wealas is offline wealas
diyAudio Member
 
Join Date: Apr 2017
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.
  Reply With Quote
Old 17th December 2017, 11:02 AM   #2535
cyrilliu is offline cyrilliu  Taiwan
Banned
 
Join Date: Sep 2014
Location: Taipei City, Taiwan
Quote:
Originally Posted by wealas View Post
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 by cyrilliu; 17th December 2017 at 11:27 AM.
  Reply With Quote
Old 17th December 2017, 11:36 AM   #2536
cyrilliu is offline cyrilliu  Taiwan
Banned
 
Join Date: Sep 2014
Location: Taipei City, Taiwan
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 by cyrilliu; 17th December 2017 at 11:57 AM.
  Reply With Quote
Old 17th December 2017, 11:41 AM   #2537
wealas is offline wealas
diyAudio Member
 
Join Date: Apr 2017
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.
  Reply With Quote
Old 17th December 2017, 12:01 PM   #2538
wealas is offline wealas
diyAudio Member
 
Join Date: Apr 2017
Or just check /data/plugins/music_service/volspotconnect/spotify-connect-web/startconnect.sh and see what device it sends the stream to.
  Reply With Quote
Old 17th December 2017, 12:06 PM   #2539
cyrilliu is offline cyrilliu  Taiwan
Banned
 
Join Date: Sep 2014
Location: Taipei City, Taiwan
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
  Reply With Quote
Old 17th December 2017, 12:16 PM   #2540
wealas is offline wealas
diyAudio Member
 
Join Date: Apr 2017
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.
  Reply With Quote

Reply


Ian asynchronous I2S and S/PDIF FIFO KIT group buyHide this!Advertise here!
Thread Tools Search this Thread
Search this Thread:

Advanced Search

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

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Asynchronous I2S FIFO project, an ultimate weapon to fight the jitter iancanada Digital Line Level 4738 9th November 2018 08:28 AM
High Performance WM8741 Super Mini DAC with I2S Data Switching PCB - Group Buy heartwinter Group Buys 26 19th January 2012 01:12 PM
Simple FIFO to I2S CPLD, for MCU players / reclocking KOON3876 Digital Line Level 21 19th September 2008 05:00 PM
What speakers are you going to use with your gainclone group buy kit AJ Bertelson Multi-Way 6 2nd March 2004 08:01 PM


New To Site? Need Help?

All times are GMT. The time now is 11:02 AM.


Search Engine Optimisation provided by DragonByte SEO (Pro) - vBulletin Mods & Addons Copyright © 2018 DragonByte Technologies Ltd.
Resources saved on this page: MySQL 14.29%
vBulletin Optimisation provided by vB Optimise (Pro) - vBulletin Mods & Addons Copyright © 2018 DragonByte Technologies Ltd.
Copyright ©1999-2018 diyAudio
Wiki