Bug 10542 - Audio Playback (flac) problems in ubuntu SC7.4 and SP7.4
: Audio Playback (flac) problems in ubuntu SC7.4 and SP7.4
Status: RESOLVED WORKSFORME
Product: SB Desktop
Classification: Unclassified
Component: Audio
: unspecified
: PC Ubuntu Linux
: P1 normal (vote)
: ---
Assigned To: Unassigned bug - please assign me!
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2009-01-05 07:59 UTC by Mikael Nyberg
Modified: 2011-01-17 09:08 UTC (History)
2 users (show)

See Also:
Category: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Mikael Nyberg 2009-01-05 07:59:36 UTC
Encountering some errors with latest SP
for example :

src/audio/decode/decode_flac.c:147 DEBUG FLAC error: FLAC__STREAM_DECODER_ERROR_STATUS_LOST_SYNC

src/audio/decode/decode_flac.c:147 DEBUG FLAC error: FLAC__STREAM_DECODER_ERROR_STATUS_LOST_SYNC

src/audio/decode/decode_flac.c:147 DEBUG FLAC error: FLAC__STREAM_DECODER_ERROR_STATUS_UNPARSEABLE_STRE AM

src/audio/decode/decode_flac.c:147 DEBUG FLAC error: FLAC__STREAM_DECODER_ERROR_STATUS_LOST_SYNC

or like this:

src/audio/decode/decode_flac.c:147 DEBUG FLAC error: FLAC__STREAM_DECODER_ERROR_STATUS_FRAME_CRC_MISMAT CH

src/audio/decode/decode_flac.c:147 DEBUG FLAC error: FLAC__STREAM_DECODER_ERROR_STATUS_LOST_SYNC

Figuring if this is related to CPU use in my desktop, closed some apps down now, I'll be back.
But i don't think so i've been hearing small glitches time to time, not so important to me as listening trough PC is not "hifi" in any way, I'm just happy that i'm able to listen to my server in an easy way from the desktop.

Nope occurs even when PC is lulling away at 10% cpu :

src/audio/decode/decode_flac.c:147 DEBUG FLAC error: FLAC__STREAM_DECODER_ERROR_STATUS_UNPARSEABLE_STRE AM

src/audio/decode/decode_flac.c:147 DEBUG FLAC error: FLAC__STREAM_DECODER_ERROR_STATUS_LOST_SYNC

Why this lost sync message ? I'm not syncing this player ?

The server is saying:

[09-01-04 17:55:20.0123] Slim::Networking::SqueezeNetwork::Players::_player s_error (146) Unable to get players from SN: Connect timed out: , retrying in 600 seconds
[09-01-04 17:56:40.0119] Slim::Networking::SqueezeNetwork::PrefSync::_syncD own_error (359) Sync Down failed: Connect timed out: , will retry in 24
[09-01-04 17:59:01.0092] Slim::Networking::SqueezeNetwork::PrefSync::_syncD own_error (359) Sync Down failed: Connect timed out: , will retry in 43
[09-01-04 18:00:43.5466] Slim::Plugin::AudioScrobbler::Plugin::_handshakeOK (365) Invalid Last.fm username or password.
[09-01-04 18:15:25.0114] Slim::Networking::SqueezeNetwork::Players::_player s_error (146) Unable to get players from SN: Connect timed out: , retrying in 300 seconds
[09-01-04 18:33:09.0366] Slim::Networking::SqueezeNetwork::PrefSync::_syncD own_error (359) Sync Down failed: Connect timed out: , will retry in 384
[09-01-04 19:20:02.7290] Slim::Utils::Timers::checkTimers (214) Error: Timer failed: Undefined subroutine &Slim::Utils::Firmware::init_fw_download called at /usr/local/bin/myperl/lib/site_perl/Slim/Utils/Firmware.pm line 236.


And some of this:
src/audio/decode/decode_flac.c:147 DEBUG FLAC error: FLAC__STREAM_DECODER_ERROR_STATUS_BAD_HEADER

Oh before anybody wonders this files works flawless on my hardware players.

This was working ok in 7.3.2 and with SP built from 7.3 trunk
Comment 1 Mikael Nyberg 2009-01-05 09:27:17 UTC
This is always occuring when i start squeezeplay

src/audio/decode/decode_alsa.c:521 ERROR Can't set audio thread priority

but it was doing so even when no glitches could be heard ?
Comment 2 Richard Titmuss 2009-01-06 04:02:54 UTC
Funnily enough I was looking at this yesterday myself. It turns out that it was a problem with the latest version of the flac library.

This should now be fixed in r3682 (desktop) and r3687 (controller). I'll be listening out for this problem myself for the rest of today.

Comment 3 Mikael Nyberg 2009-01-06 04:26:10 UTC
thankyou : ) will test away this afternon.

On a related matter (showing of my ignorance )

It looks to me as SP only uses 16bit resulotion on my PC ?
Converting S32_LE to S16_LE which does not matter normally but sometimes i have 24bit files ?

Plug PCM: Linear conversion PCM (S16_LE)
Its setup is:
  stream       : PLAYBACK
  access       : MMAP_INTERLEAVED
  format       : S32_LE
  subformat    : STD
  channels     : 2
  rate         : 48000
  exact rate   : 48000 (48000/1)
  msbits       : 32
  buffer_size  : 16384
  period_size  : 4096
  period_time  : 85333
  tick_time    : 0
  tstamp_mode  : NONE
  period_step  : 1
  sleep_min    : 0
  avail_min    : 4096
  xfer_align   : 4096
  start_threshold  : 1
  stop_threshold   : 16384
  silence_threshold: 0
  silence_size : 0
  boundary     : 1073741824
Slave: Hardware PCM card 0 'Audigy 2 [Unknown]' device 0 subdevice 0
Its setup is:
  stream       : PLAYBACK
  access       : MMAP_INTERLEAVED
  format       : S16_LE
  subformat    : STD
  channels     : 2
  rate         : 48000
  exact rate   : 48000 (48000/1)
  msbits       : 16
  buffer_size  : 16384
  period_size  : 4096
  period_time  : 85333
  tick_time    : 0
  tstamp_mode  : NONE
  period_step  : 1
  sleep_min    : 0
  avail_min    : 4096
  xfer_align   : 4096
  start_threshold  : 1
  stop_threshold   : 16384
  silence_threshold: 0
  silence_size : 0
  boundary     : 1073741824
Comment 4 Richard Titmuss 2009-01-06 04:31:44 UTC
The format conversion will depend on your PC sound card and system alsa configuration. If you sound card supports 24 bits, and alsa is configured correctly then SqueezePlay should play with 24 bits accuracy (it uses 32 bit resolution internally).

Comment 5 Mikael Nyberg 2009-01-06 04:44:36 UTC
OK  I migth have to reinstall ubuntu then i think the upgrade from 7.10 to 8.04 can do wierd things with for example alsa.

I don't exactly trust Ubuntu's uppgrade scheme, a lot of small things can be subbtly broken.

And manually configuring alsa is frankly beyond me, could also be crappy drivers for my SB Audigy2.

Audigy 2 should support 24bit

I've found no good beginners guide to meddling with alsa.

Thank you for explaining this, now I know.

But then again who cares about 24bit from the PC for SQ , i was just thinking that format conversion loads the cpu unnecessary.

I also recon the bug as closed I played a bunch of tunes trouble free know.
Comment 6 Mikael Nyberg 2009-01-06 05:22:56 UTC
oops:

rc/audio/decode/decode_flac.c:147 DEBUG FLAC error: FLAC__STREAM_DECODER_ERROR_STATUS_FRAME_CRC_MISMATCH

rc/audio/decode/decode_flac.c:147 DEBUG FLAC error: FLAC__STREAM_DECODER_ERROR_STATUS_FRAME_CRC_MISMATCH

another one , maybe my system is to busted to test this properly anyway

I'll try next build and report back.

but the frequency of this event has been reduced anyway but it is still there
Comment 7 Richard Titmuss 2009-01-06 06:40:59 UTC
Your right, it's not correct yet so I'm reopening the bug for now.
Comment 8 Richard Titmuss 2009-01-06 10:22:54 UTC
Ok, let's try again. A new fix in 7.3.2 r3697 (desktop) and r3698 (controller).

Comment 9 Mikael Nyberg 2009-01-06 10:37:06 UTC
ok building now, i hope.

I have just assumed that you can build a new one without removing the old build.
I have also assumed that you can keep the settings files in .squeezeplay

Such very basic linux info is seldom spelled out anywhere, learning by burning is the way..

Build is now finished i will play tunes for a while now I'll report back later.
Comment 10 Mikael Nyberg 2009-01-06 11:30:41 UTC
Now it is much better no glitches at al plays ok all the time.

One remaining error msg at start:
src/audio/decode/decode_alsa.c:521 ERROR Can't set audio thread priority

But it does not seem to have any audible consequence.

Well done, must be the fastest bug fix ever (besides from the ones we end user's don't know of )

btw
My weird alsa setup continues to baffle me, my PC accepts 96kHz but not more than 16bit (if I trick SP to tell SC that it is a transporter i get 96 streamed to my PC from my 24/96 files )
Comment 11 Richard Titmuss 2009-01-06 12:06:21 UTC
I'm glad it's fixed. I have to admit it's not the fastest, this has been a problem for at least a couple of months now. Your just lucky you created the bug the day I was looking at the problem :).

The "Can't set audio thread priority" message will go away if you run the process as root. It tries to create a real-time priority thread when the application starts, and that needs root permissions. If you hear audible glitches (of silence or repeated sections) then it may perform better with the real-time priority. Otherwise don't worry :).

Comment 12 Mikael Nyberg 2009-01-06 12:17:24 UTC
I se,e actually i've seen some of these errors  before but it has not been any audiable glitches before x-mas I think

OK should i have installed the squeezeplay SVN as root and do the build as root to ? i did this as a user on my ubuntu ?
Comment 13 Richard Titmuss 2009-01-06 13:36:46 UTC
No, you can checkout with svn and build as your user. Running the application as root allows the real-time thread, but probably is a potential security problem! There probably is a better way to allow the application to use real-time threads but I've not looked into this.
Comment 14 James Richardson 2009-01-15 08:09:20 UTC
Moving target to > 7.3.2 for verification with new Jive Firmware >3699
Comment 15 James Richardson 2009-10-05 14:34:53 UTC
This bug has been marked as fixed in the 7.4.0 release version of SqueezeBox Server!
    * SqueezeCenter: 28672
    * Squeezebox 2 and 3: 130
    * Transporter: 80
    * Receiver: 65
    * Boom: 50
    * Controller: 7790
    * Radio: 7790  

Please see the Release Notes for all the details: http://wiki.slimdevices.com/index.php/Release_Notes

If you haven't already, please download and install the new version from http://www.logitechsqueezebox.com/support/download-squeezebox-server.html

If you are still experiencing this problem, feel free to reopen the bug with your new comments and we'll have another look.
Comment 16 Mikael Nyberg 2009-10-09 08:31:26 UTC
No squeezeplay does not play any audio on ubuntu 8.10 or 9.04 for me.

I build from svn is there any deb package I can use instead with bug corrections.
Latest from svn does not work

20091009 15:20:35.431 ERROR  audio.output - decode_alsa_fork:169 execv failed 2
20091009 15:20:35.931 ERROR  audio.output - decode_alsa_fork:184 jive_alsa failed to start

But ic an use it as a remote.

I don't know how run the squeezeplay.sh trough gdb to get more output.

But running jive directly gives this

(gdb) run
Starting program: /opt/squeezeplay/bin/jive 
[Thread debugging using libthread_db enabled]

Squeezeplay 7.4 r7679
[New Thread 0xb7bf66b0 (LWP 8245)]
20091009 15:24:37.382 INFO   squeezeplay - JiveMain.lua:280 SqueezePlay version 7.4 r7679
20091009 15:24:37.510 INFO   squeezeplay.ui.draw - jiveL_initSDL:174 1920,1080 32 bits/pixel 4 bytes/pixel [R<<16 G<<8 B<<0]
20091009 15:24:37.510 INFO   squeezeplay.ui.draw - jiveL_initSDL:175 Hardware acceleration is not available
[New Thread 0xb76adb90 (LWP 8248)]
20091009 15:24:37.577 INFO   squeezeplay.applets - AppletManager.lua:91 User Path: /home/mikael/.squeezeplay/userpath
20091009 15:24:37.680 INFO   squeezeplay.applets - AppletManager.lua:314 Registering: DesktopJive
[New Thread 0xb7314b90 (LWP 8251)]
20091009 15:24:37.696 INFO   squeezeplay.applets - AppletManager.lua:314 Registering: SetupSoundEffects
20091009 15:24:37.697 INFO   squeezeplay.applets - AppletManager.lua:314 Registering: AboutJive
20091009 15:24:37.698 INFO   squeezeplay.applets - AppletManager.lua:314 Registering: AlarmSnooze
20091009 15:24:37.698 INFO   squeezeplay.applets - AppletManager.lua:314 Registering: BlankScreen
20091009 15:24:37.699 INFO   squeezeplay.applets - AppletManager.lua:314 Registering: Bounce
20091009 15:24:37.703 INFO   squeezeplay.applets - AppletManager.lua:314 Registering: ChooseMusicSource
20091009 15:24:37.707 INFO   squeezeplay.applets - AppletManager.lua:314 Registering: Clock
20091009 15:24:37.709 INFO   squeezeplay.applets - AppletManager.lua:314 Registering: CustomizeHomeMenu
20091009 15:24:37.709 INFO   squeezeplay.applets - AppletManager.lua:314 Registering: DebugSkin
20091009 15:24:37.710 INFO   squeezeplay.applets - AppletManager.lua:314 Registering: DebugTouch
20091009 15:24:37.711 INFO   squeezeplay.applets - AppletManager.lua:314 Registering: Experiments
20091009 15:24:37.711 INFO   squeezeplay.applets - AppletManager.lua:314 Registering: FullscreenSkin
20091009 15:24:37.715 INFO   squeezeplay.applets - AppletManager.lua:314 Registering: HttpAuth
20091009 15:24:37.717 INFO   squeezeplay.applets - AppletManager.lua:314 Registering: InfoBrowser
20091009 15:24:37.718 INFO   squeezeplay.applets - AppletManager.lua:314 Registering: LogSettings
20091009 15:24:37.720 INFO   squeezeplay.applets - AppletManager.lua:314 Registering: MacroPlay
20091009 15:24:37.723 INFO   squeezeplay.applets - AppletManager.lua:314 Registering: NowPlaying
20091009 15:24:37.726 INFO   squeezeplay.applets - AppletManager.lua:314 Registering: Playback
20091009 15:24:37.726 INFO   squeezeplay.applets - AppletManager.lua:314 Registering: QVGAbaseSkin
20091009 15:24:37.726 INFO   squeezeplay.applets - AppletManager.lua:314 Registering: QVGAlandscapeSkin
20091009 15:24:37.727 INFO   squeezeplay.applets - AppletManager.lua:314 Registering: QVGAportraitSkin
20091009 15:24:37.727 INFO   squeezeplay.applets - AppletManager.lua:314 Registering: Quit
20091009 15:24:37.731 INFO   squeezeplay.applets - AppletManager.lua:314 Registering: ScreenSavers
20091009 15:24:37.732 INFO   squeezeplay.applets - AppletManager.lua:314 Registering: Screenshot
20091009 15:24:37.733 INFO   squeezeplay.applets - AppletManager.lua:314 Registering: SelectPlayer
20091009 15:24:37.742 INFO   squeezeplay.applets - AppletManager.lua:314 Registering: SelectSkin
20091009 15:24:37.746 INFO   squeezeplay.applets - AppletManager.lua:314 Registering: SetupAppletInstaller
20091009 15:24:37.749 INFO   squeezeplay.applets - AppletManager.lua:314 Registering: SetupDateTime
20091009 15:24:37.750 INFO   squeezeplay.applets - AppletManager.lua:314 Registering: SetupLanguage
20091009 15:24:37.756 INFO   squeezeplay.applets - AppletManager.lua:314 Registering: SetupNetTest
20091009 15:24:37.763 INFO   squeezeplay.applets - AppletManager.lua:314 Registering: SetupSqueezebox
20091009 15:24:37.772 INFO   squeezeplay.applets - AppletManager.lua:314 Registering: SetupWallpaper
20091009 15:24:37.774 INFO   squeezeplay.applets - AppletManager.lua:314 Registering: SetupWelcome
20091009 15:24:37.779 INFO   squeezeplay.applets - AppletManager.lua:314 Registering: SlimBrowser
20091009 15:24:37.811 INFO   squeezeplay.applets - AppletManager.lua:314 Registering: SlimDiscovery
20091009 15:24:37.818 INFO   squeezeplay.applets - AppletManager.lua:314 Registering: SlimMenus
20091009 15:24:37.826 INFO   squeezeplay.applets - AppletManager.lua:314 Registering: SqueezeNetworkPIN
20091009 15:24:37.826 INFO   squeezeplay.applets - AppletManager.lua:314 Registering: Test
20091009 15:24:37.827 INFO   squeezeplay.applets - AppletManager.lua:314 Registering: TestTones
20091009 15:24:37.827 INFO   squeezeplay.applets - AppletManager.lua:314 Registering: UdapControl
20091009 15:24:37.829 INFO   squeezeplay.applets - AppletManager.lua:314 Registering: WQVGAlargeSkin
20091009 15:24:37.830 INFO   squeezeplay.applets - AppletManager.lua:314 Registering: WQVGAsmallSkin
20091009 15:24:37.830 INFO   squeezeplay.applets - AppletManager.lua:314 Registering: Demo
20091009 15:24:37.859 INFO   squeezeplay - JiveMain.lua:599 select skin: WQVGAsmallSkin
20091009 15:24:37.914 ERROR  squeezeplay.ui.draw - jive_tile_load_tiles:133 Can't find image applets/WQVGAsmallSkin/images/Popup_Menu/button_cm_menu_press.png

20091009 15:24:37.914 ERROR  squeezeplay.ui.draw - jive_tile_load_tiles:133 Can't find image applets/WQVGAsmallSkin/images/Popup_Menu/button_cm_menu_press_tl.png

20091009 15:24:37.914 ERROR  squeezeplay.ui.draw - jive_tile_load_tiles:133 Can't find image applets/WQVGAsmallSkin/images/Popup_Menu/button_cm_menu_press_t.png

20091009 15:24:37.914 ERROR  squeezeplay.ui.draw - jive_tile_load_tiles:133 Can't find image applets/WQVGAsmallSkin/images/Popup_Menu/button_cm_menu_press_tr.png

20091009 15:24:37.914 ERROR  squeezeplay.ui.draw - jive_tile_load_tiles:133 Can't find image applets/WQVGAsmallSkin/images/Popup_Menu/button_cm_menu_press_r.png

20091009 15:24:37.915 ERROR  squeezeplay.ui.draw - jive_tile_load_tiles:133 Can't find image applets/WQVGAsmallSkin/images/Popup_Menu/button_cm_menu_press_br.png

20091009 15:24:37.915 ERROR  squeezeplay.ui.draw - jive_tile_load_tiles:133 Can't find image applets/WQVGAsmallSkin/images/Popup_Menu/button_cm_menu_press_b.png

20091009 15:24:37.915 ERROR  squeezeplay.ui.draw - jive_tile_load_tiles:133 Can't find image applets/WQVGAsmallSkin/images/Popup_Menu/button_cm_menu_press_bl.png

20091009 15:24:37.915 ERROR  squeezeplay.ui.draw - jive_tile_load_tiles:133 Can't find image applets/WQVGAsmallSkin/images/Popup_Menu/button_cm_menu_press_l.png

20091009 15:24:38.160 ERROR  squeezeplay.ui.draw - jive_surface_load_image:195 Can't find image applets/WQVGAsmallSkin/images/IconsResized/icon_power_off2_touch.png

20091009 15:24:38.215 INFO   applet.SlimDiscovery - SlimDiscoveryApplet.lua:603 selected Ubuntu
20091009 15:24:38.242 INFO   applet.SlimMenus - SlimMenusApplet.lua:1003 SlimMenusApplet:notify_playerCurrent(LocalPlayer {Ubuntu})
20091009 15:24:38.242 INFO   applet.SlimMenus - SlimMenusApplet.lua:1065 No server, Fetching initial server, SlimServer {hal.home.lan}
20091009 15:24:38.242 INFO   applet.SlimMenus - SlimMenusApplet.lua:1074 player changed from:false to LocalPlayer {Ubuntu} but server not yet connected
20091009 15:24:38.254 INFO   net.slimproto - SlimProto.lua:563 connect to 192.168.1.5 (192.168.1.5)
20091009 15:24:38.260 ERROR  audio.output - decode_alsa_check_pids:48 exit, playback child is dead
Comment 17 Andy Grundman 2009-10-15 09:25:42 UTC
SP Desktop issues shouldn't hold up 7.4.1, moving to 7.4.x.
Comment 18 Deverne 2009-10-20 15:18:16 UTC
I've got the same problem as Mikael Nyberg.
I'm running Ubuntu 9.04.
I built squeezeplay from SVN : Squeezeplay 7.4.1 r7911
The corresponding squeezebox server is version 7.4.0

And I got the two following messages:
20091020 22:08:09.453 ERROR  audio.output - decode_alsa_fork:169 execv failed 2
20091020 22:08:09.953 ERROR  audio.output - decode_alsa_fork:184 jive_alsa failed to start

The rest of the application si working well.

After some search, it appears that my make -f Makefile.linux fails to install some library in /usr/local/... because I didn't run it as root.

Trying to work around line 169 of decode_alsa.c, to be continued later...
Comment 19 Chris Owens 2010-03-15 18:18:10 UTC
7.4.x milestone is in the past
Comment 20 Chris Owens 2010-05-07 10:28:29 UTC
Richard is no longer available to us.