Home of the Squeezebox™ & Transporter® network music players.
Results 1 to 6 of 6
  1. #1
    Junior Member
    Join Date
    Nov 2011
    Posts
    7

    SqueezePlay Fix for 24 bit output on Linux

    Hi
    as noticed in other threads, squeezeplay outputs always in 16bit in linux.
    I made a little change in squeezeplay/src/audio/decode/decode_alsa.c to make it output 24bit

    I changed the line:
    sample_size = luaL_optinteger(L, -1, 16);
    with:
    sample_size = luaL_optinteger(L, -1, 24);

    And now the output is always S24_LE.

    What happens to 16bit data? It sounds ok so I think that is padded to 24 bit by squeezeplay or portaudio, is that right?
    Why the sample size is "fixed" to 16 bit?

    Thank you
    Fabio

  2. #2
    Junior Member
    Join Date
    Nov 2011
    Posts
    7

    More tests and it's still not OK

    I've done some listening tests and the 24bit files sound better in mplayer than in squeezeplay.
    More test show that the previous fix didn't improve sound on 24bit files: they sound like 16bit files.
    Alsa and squeezeplay debugging show that output is 24bit but it sounds like 16bit padded into 24bit. I think that squeezeplay converts the sound from 24bit to 16bit and (in the end, probably by jive_alsa) it is again converted to 24bit...
    Any help from the developers?
    Thank you in advance
    Fabio

  3. #3
    Senior Member
    Join Date
    Nov 2011
    Posts
    155
    in Linux you can choose the audio device and other parameters through setting file:
    ~/.squeezeplay/userpath/settings/DesktopJive.lua

    I have following content in it:
    settings = {mac="xx:xx:xx:xx:xx:xx",uuid="xxxxxxxxxxxxxxxxxxx x"",alsaSampleSize=24,alsaPlaybackDevice="plugh w:2 ,0",alsaEffectsDevice="plughw:0,0",alsaPlaybackB uf ferTime=50000,alsaPlaybackPeriodCount=3}

    I have verified that above settings really give 24bit at least to my USB Audiophilleo1 device.

  4. #4
    Junior Member
    Join Date
    Nov 2011
    Posts
    7
    Great post. Now I do not have to patch the sources every time!
    Interesting the alsaplaybackbuffertime option. Does a bigger buffer give better sound quality?

  5. #5
    Member
    Join Date
    Feb 2011
    Location
    Tulsa, Oklahoma
    Posts
    55

    High CPU usage

    Quote Originally Posted by kipeta View Post
    in Linux you can choose the audio device and other parameters through setting file:
    ~/.squeezeplay/userpath/settings/DesktopJive.lua

    I have following content in it:
    settings = {mac="xx:xx:xx:xx:xx:xx",uuid="xxxxxxxxxxxxxxxxxxx x"",alsaSampleSize=24,alsaPlaybackDevice="plugh w:2 ,0",alsaEffectsDevice="plughw:0,0",alsaPlaybackB uf ferTime=50000,alsaPlaybackPeriodCount=3}

    I have verified that above settings really give 24bit at least to my USB Audiophilleo1 device.
    Thank you very much for this gem of information, I do want to add that your line results in a high CPU load.
    Top shows a load of 30%.

    When I modify your line to this, I have a normal CPU load of 1%:
    settings = {mac="xx:xx:xx:xx:xx:xx",uuid="yyy",alsaSampleSize =24,alsaPlaybackDevice="plughw:1,0",}

  6. #6
    Senior Member
    Join Date
    Nov 2011
    Posts
    155
    Quote Originally Posted by wilbert-vb View Post
    Thank you very much for this gem of information, I do want to add that your line results in a high CPU load.
    Top shows a load of 30%.

    When I modify your line to this, I have a normal CPU load of 1%:
    settings = {mac="xx:xx:xx:xx:xx:xx",uuid="yyy",alsaSampleSize =24,alsaPlaybackDevice="plughw:1,0",}
    I don't personally have such a high load (jive and both jive_alsa's are showing 1-4% in Top). It's really difficult to guess the reason for your case. Which process of SqueezePlay is causing the load? jive or jive_alsa? jive_alsa of Effects or Playback device?

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
  •