Bass amp problem

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • ralphy
    Senior Member
    • Jan 2006
    • 3229

    #31
    I see you discovered that the dsp bits are private.

    The biggest issue is that the Ubuntu 10.4.04 ssl libraries are dated and many sites no longer allow connections with the known unsecure ssl protocols. I used the i386 iso to create the VM.

    I had to rename the fakeroot_1.9.4.bb to fakeroot_1.9.5.bb and update the source url, change the source url in qemu_0.9.1.bb to a valid location and download libpng-1.2.43.tar.bz2 into the poky/sources folder because SF doesn't allow the old ssl protocols, before bitbake squeezeos-image ran to completion.

    I updated poky/build/conf/local.conf so bitbake uses all 4 cpus during the build/make process.

    BB_NUMBER_THREADS = "4"
    PARALLEL_MAKE = "-j 4"

    Then build the image.

    bitbake squeezeos-image

    Afterware, rebuilding just decode_alsa_backend.c is a bit special.

    Change the code once you find it!

    Code:
    /home/ralphy/source/squeezeos/poky/build/tmp-jive/work/armv5te-none-linux-gnueabi/squeezeplay-7.8+svnr0+49f41e48311ade3a4a879b4b27283036363724b5-r24/squeezeplay/src/audio/decode
    Recompile just the changes.

    bitbake -f -c compile squeezeplay

    Rebuild the image

    bitbake squeezeos-image

    Grab the file from the image at

    Code:
    /home/ralphy/source/squeezeos/poky/build/tmp-jive/rootfs/usr/bin
    Ralphy

    1-Touch, 5-Classics, 3-Booms, 2-UE Radio
    Squeezebox client builds donations always appreciated.

    Comment

    • ralphy
      Senior Member
      • Jan 2006
      • 3229

      #32
      I started cherry picking Triode's EDO and my jive_alsa fixes but eventually decided it would be better to keep the code as close to each other as possible. There are new features that are useless to the radio but cause no harm either.

      So I took the latest decode_alsa_backend.c from my squeezeplay repository with the patch to reopen the ALSA device if the number of available frames exceeds the total number of frames in the buffer applied as well and ended up with v1.4.

      I changed these modules from INFO to WARN on the Radio in settings->advanced->logging.
      ["audio.codec"]="WARN"
      ["audio.decode"]="WARN"
      ["audio.output"]="WARN"

      The error reporting is much better in the updated version, so if/when you experience an issue, login to the radio and look at /var/log/messages

      The code is available on my github site

      To update jive_alsa to 1.4
      Code:
      ssh -l root radio
      
      cd /usr
      
      wget http://ralph-irving.users.sourceforge.net/extensions/RadioJiveAlsa-1.4.tgz
      
      # backup the older version, don't use copy as the file is in use.
      # you must move it out of the way for the new file to be extracted from the tarball.
      mv bin/jive_alsa bin/jive_alsa-1.0
      
      tar xzf RadioJiveAlsa-1.4.tgz
      
      rm RadioJiveAlsa-1.4.tgz
      
      reboot
      After the reboot you can delete /usr/bin/jive_alsa-1.0 if you want, but don't delete the original jive_alsa.bak logitech build.

      From the radio, you can confirm the version after the reboot.

      Code:
      /usr/bin/jive_alsa -?
      Usage: /usr/bin/jive_alsa [B]ri1.4[/B] [-v] -d <playback_device> [-c <capture_device>] [ -t <pcm_timeout>] [ -s <sample_size>] -b <buffer_time> -p <period_count> -f <flags>
      Last edited by ralphy; 2019-02-01, 14:22. Reason: Updated for 1.4
      Ralphy

      1-Touch, 5-Classics, 3-Booms, 2-UE Radio
      Squeezebox client builds donations always appreciated.

      Comment

      • mrw
        Senior Member
        • May 2010
        • 1083

        #33
        @ralphy
        Many thanks for the notes.

        I didn't realize how much you have 'advanced' Squeezeplay. I may have a few other (cosmetic, I suspect) patches that I've built up over time. If any still seem to be relevant I'll pass them on.

        Comment

        • ralphy
          Senior Member
          • Jan 2006
          • 3229

          #34
          Thank you, that would be great!

          I've added the patch we discussed here to the squeezeplay git repo.
          Ralphy

          1-Touch, 5-Classics, 3-Booms, 2-UE Radio
          Squeezebox client builds donations always appreciated.

          Comment

          • ToddeSwe
            Member
            • Jan 2018
            • 59

            #35
            Originally posted by philippe_44
            Hi - I'm having a problem on almost all my Radio(s): from time to time (especially after a pause/ resume) all bass-medium are gone which seems to indicate that the amp in charge of bass-medium speaker drive is off and does not resume. A power cycle solves the problem, but this is a bit strange. Am I the only one to observe that ?
            Yes it’s the same for me.


            Skickat från min iPhone med Tapatalk

            Comment

            • slartibartfast
              Senior Member
              • Jan 2010
              • 13173

              #36
              Interesting occurrence this morning. Radio was playing Radio 2 on battery. When I plugged in the power supply the bass disappeared when the Radio started charging. This combination has never happened before. Anyway I happened to have a preset for Virgin Radio and switching to that restored the bass. I believe BBC is 48kHz sample rate so Virgin is probably 44.1kHz.

              Sent from my SM-G900F using Tapatalk
              Living Room: Touch or Squeezelite (Pi3B) > Topping E30 > Audiolab 8000A > Monitor Audio S5 + BK200-XLS DF
              Bedroom: Radio
              Bathroom: Radio

              Comment

              • mrw
                Senior Member
                • May 2010
                • 1083

                #37
                Originally posted by slartibartfast
                Interesting occurrence this morning.
                Anything of interest in the Radio's log ?

                Comment

                • slartibartfast
                  Senior Member
                  • Jan 2010
                  • 13173

                  #38
                  Originally posted by mrw
                  Anything of interest in the Radio's log ?
                  I can't remember how to download the log. I have logged in with putty and found the file, but now what?

                  Edit. First time I logged in and used the command ls I could see files and directories. Second time I logged I couldn' t see anything. Confused.

                  Sent from my SM-G900F using Tapatalk
                  Last edited by slartibartfast; 2019-01-23, 13:13.
                  Living Room: Touch or Squeezelite (Pi3B) > Topping E30 > Audiolab 8000A > Monitor Audio S5 + BK200-XLS DF
                  Bedroom: Radio
                  Bathroom: Radio

                  Comment

                  • mrw
                    Senior Member
                    • May 2010
                    • 1083

                    #39
                    Originally posted by slartibartfast
                    I can't remember how to download the log. I have logged in with putty and found the file, but now what?

                    Edit. First time I logged in and used the command ls I could see files and directories. Second time I logged I couldn' t see anything. Confused.

                    Sent from my SM-G900F using Tapatalk
                    After you have logged in to the radio, you should be able to view the log on screen with the command:
                    Code:
                    cat /var/log/messages
                    I have never used putty. On a Mac or Linux box one can do (from a terminal prompt):
                    Code:
                    scp root@yourradio:/var/log/messages radio.log
                    which will log in to the radio and then copy the log to a file named 'radio.log' in one's current directory.

                    I believe that putty provides a similar command, 'PSCP', which would work in much the same way. Section 5.2.1 seems to cover it.

                    Comment

                    • slartibartfast
                      Senior Member
                      • Jan 2010
                      • 13173

                      #40
                      Originally posted by mrw
                      After you have logged in to the radio, you should be able to view the log on screen with the command:
                      Code:
                      cat /var/log/messages
                      I have never used putty. On a Mac or Linux box one can do (from a terminal prompt):
                      Code:
                      scp root@yourradio:/var/log/messages radio.log
                      which will log in to the radio and then copy the log to a file named 'radio.log' in one's current directory.

                      I believe that putty provides a similar command, 'PSCP', which would work in much the same way. Section 5.2.1 seems to cover it.

                      https://www.ssh.com/ssh/putty/putty-.../Chapter5.html
                      Finally managed to read the messages.0 file and cannot see anything useful. Not really sure what to look for though. I am sure I copied messages files to my PC years ago but I have no idea how. It must have been fairly straightforward. Maybe I used WinSCP.

                      Sent from my SM-G900F using Tapatalk
                      Living Room: Touch or Squeezelite (Pi3B) > Topping E30 > Audiolab 8000A > Monitor Audio S5 + BK200-XLS DF
                      Bedroom: Radio
                      Bathroom: Radio

                      Comment

                      • slartibartfast
                        Senior Member
                        • Jan 2010
                        • 13173

                        #41
                        Originally posted by mrw
                        After you have logged in to the radio, you should be able to view the log on screen with the command:
                        Code:
                        cat /var/log/messages
                        I have never used putty. On a Mac or Linux box one can do (from a terminal prompt):
                        Code:
                        scp root@yourradio:/var/log/messages radio.log
                        which will log in to the radio and then copy the log to a file named 'radio.log' in one's current directory.

                        I believe that putty provides a similar command, 'PSCP', which would work in much the same way. Section 5.2.1 seems to cover it.

                        https://www.ssh.com/ssh/putty/putty-.../Chapter5.html
                        WinSCP was the answer. Can you see anything?

                        Code:
                        Jan 23 10:03:51 squeezeplay: INFO   squeezeplay - JiveMain.lua:207 Turn soft power on
                        Jan 23 10:03:51 squeezeplay: INFO   squeezebox.server - SlimServer.lua:683 wakeOnLan(): Sending WOL to xx:xx:xx:xx:xx:xx
                        Jan 23 10:03:52 squeezeplay: INFO   applet.SlimMenus - SlimMenusApplet.lua:502 _menuSink(1) nil menuDirective: add isCurrentServer:true
                        Jan 23 10:03:52 squeezeplay: INFO   applet.SlimMenus - SlimMenusApplet.lua:802 hiding any 'connecting to server' popup after menu response from current server, SlimServer {max2play}
                        Jan 23 10:03:52 squeezeplay: DEBUG  applet.AlarmSnooze - AlarmSnoozeApplet.lua:275 notify_playerLoaded(LocalPlayer {Black Radio})
                        Jan 23 10:03:52 squeezeplay: INFO   applet.ChooseMusicSource - ChooseMusicSourceApplet.lua:543 Hiding popup, exists?: nil
                        Jan 23 10:03:52 squeezeplay: INFO   applet.SlimDiscovery - SlimDiscoveryApplet.lua:517 notify_playerPower: true
                        Jan 23 10:03:52 squeezeplay: DEBUG  applet.AlarmSnooze - AlarmSnoozeApplet.lua:293 notify_playerPower(): true
                        Jan 23 10:03:53 squeezeplay: INFO   applet.NowPlaying - NowPlayingApplet.lua:422 enable volume UI in NP
                        Jan 23 10:03:54 squeezeplay: INFO   audio.decode - decode_start_handler:279 init decoder aac
                        Jan 23 10:03:54 squeezeplay: INFO   audio.decode - Playback.lua:476 connect 192.168.0.10:9000 GET /stream.mp3?player=yy:yy:yy:yy:yy:yy HTTP/1.0^M
                        Jan 23 10:03:54 squeezeplay: INFO   applet.SlimMenus - SlimMenusApplet.lua:502 _menuSink(1) nil menuDirective: add isCurrentServer:true
                        Jan 23 10:03:54 squeezeplay: INFO   applet.SlimMenus - SlimMenusApplet.lua:802 hiding any 'connecting to server' popup after menu response from current server, SlimServer {max2play}
                        Jan 23 10:03:54 squeezeplay: DEBUG  applet.AlarmSnooze - AlarmSnoozeApplet.lua:275 notify_playerLoaded(LocalPlayer {Black Radio})
                        Jan 23 10:03:54 squeezeplay: INFO   applet.ChooseMusicSource - ChooseMusicSourceApplet.lua:543 Hiding popup, exists?: nil
                        Jan 23 10:03:55 squeezeplay: DEBUG  applet.AlarmSnooze - AlarmSnoozeApplet.lua:317 notify_playerModeChange: player (LocalPlayer {Black Radio}) mode has been changed to play
                        Jan 23 10:03:55 squeezeplay: WARN   applet.AlarmSnooze - AlarmSnoozeApplet.lua:323 notify_playerModeChange: - audioState is 1
                        Jan 23 10:03:56 squeezeplay: INFO   applet.NowPlaying - NowPlayingApplet.lua:422 enable volume UI in NP
                        Jan 23 10:03:58 squeezeplay: INFO   squeezeplay.applets - AppletManager.lua:708 store settings: Playback
                        Jan 23 10:04:06 squeezeplay: INFO   squeezeplay.applets - AppletManager.lua:708 store settings: Playback
                        Jan 23 10:04:31 squeezeplay: audio_thread_execute:1025 xrun (snd_pcm_mmap_commit) err=-32
                        Jan 23 10:04:31 kernel: [23220.486184] ssi1_irq SISR 1120 SIER 180100 fifo_errs=1
                        Jan 23 10:04:43 squeezeplay: INFO   audio.decode - decode_start_handler:279 init decoder mp3
                        Jan 23 10:04:43 squeezeplay: INFO   audio.decode - Playback.lua:476 connect 89.185.149.133:80 GET /stream HTTP/1.0^M
                        Jan 23 10:04:43 squeezeplay: INFO   audio.decode - Playback.lua:479 GET /stream HTTP/1.0^M
                        Jan 23 10:04:43 squeezeplay: Cache-Control: no-cache^M
                        Jan 23 10:04:43 squeezeplay: Connection: close^M
                        Jan 23 10:04:43 squeezeplay: Accept: */*^M
                        Jan 23 10:04:43 squeezeplay: Host: radio.virginradio.co.uk^M
                        Jan 23 10:04:43 squeezeplay: User-Agent: iTunes/4.7.1 (Linux; N; Debian; armv7l-linux; EN; utf8) SqueezeCenter, Squeezebox Server, Logitech Media Server/7.9.2/1545144292^M
                        Jan 23 10:04:43 squeezeplay: Icy-Metadata: 1^M
                        Jan 23 10:04:43 squeezeplay: ^M
                        Jan 23 10:04:44 squeezeplay: INFO   applet.NowPlaying - NowPlayingApplet.lua:422 enable volume UI in NP
                        Jan 23 10:04:50 squeezeplay: INFO   audio.decode - decode_start_handler:279 init decoder aac
                        Jan 23 10:04:50 squeezeplay: INFO   audio.decode - Playback.lua:476 connect 192.168.0.10:9000 GET /stream.mp3?player=yy:yy:yy:yy:yy:yy HTTP/1.0^M
                        Jan 23 10:04:51 squeezeplay: INFO   applet.NowPlaying - NowPlayingApplet.lua:422 enable volume UI in NP
                        Jan 23 10:05:21 squeezeplay: INFO   applet.NowPlaying - NowPlayingApplet.lua:422 enable volume UI in NP
                        Jan 23 10:05:50 squeezeplay: INFO   applet.ScreenSavers - ScreenSaversApplet.lua:292 activating Clock screensaver
                        Jan 23 10:08:51 squeezeplay: INFO   applet.NowPlaying - NowPlayingApplet.lua:422 enable volume UI in NP
                        Living Room: Touch or Squeezelite (Pi3B) > Topping E30 > Audiolab 8000A > Monitor Audio S5 + BK200-XLS DF
                        Bedroom: Radio
                        Bathroom: Radio

                        Comment

                        • mrw
                          Senior Member
                          • May 2010
                          • 1083

                          #42
                          Originally posted by slartibartfast
                          WinSCP was the answer. Can you see anything?
                          I think so. I've snipped away a bit to highlight an error reported 10 seconds or so before you switched over to Virgin:

                          Code:
                          Jan 23 10:04:31 squeezeplay: audio_thread_execute:1025 xrun (snd_pcm_mmap_commit) err=-32
                          Jan 23 10:04:31 kernel: [23220.486184] ssi1_irq SISR 1120 SIER 180100 fifo_errs=1
                          This was also observed and reported on by pbg4 last November: https://forums.slimdevices.com/showt...l=1#post925651

                          I won't pretend to be any wiser, but it may offer a clue as to where to start looking. It does increase my confidence in the thing being a soft error, and not hardware related.

                          Well done for retrieving the log !

                          Comment

                          • mrw
                            Senior Member
                            • May 2010
                            • 1083

                            #43
                            Interim conclusions and pointers to solutions

                            Originally posted by mrw
                            I won't pretend to be any wiser, but it may offer a clue as to where to start looking.
                            I've had a further look, and made some experimentation.

                            My draft conclusions are:
                            • The problem arises when there are under-runs between jive_alsa and the ALSA sub-system.
                            • The Radio's ALSA Crossover plugin component sometimes, but not always, gets into a strange state ("woofer-dropout") when this happens.
                              Specifically it ceases to generate an audible stream for the woofer channel.
                            • While jive_alsa appears to successfully recover the situation (through a call to ALSA's snd_pcm_recover), the Crossover plugin remains in woofer-dropout.
                              So the pcm stream isn't really recovered. A flaw in the Crossover plugin ?
                              Closing and reopening the pcm device seems to be the only sure way of resetting the Crossover. (Although I have twice seen it spontaneously recover after another under-run).
                              Which is why choosing a stream with a different sample rate recovers the situation.
                            • The under-runs are most likely to occur when jive_alsa has most work to do. This is when it is playing a 48k sample rate stream with a sound effect in progress.
                              Because:
                              a) 48k is 10% more than 44.1k, and
                              b) The sound effects have to be up-sampled on the fly from 44.1k to 48k (they are stored internally at 44.1k).

                            So that explains the strong association I have made with 48k streams and pressing one of the buttons (it generates a sound effect).

                            Edit: It is also conceivable that the content of some streams may trigger woofer-dropout, without there ever being an under-run. But I haven't knowingly encountered one.

                            Possible solutions:
                            • Switch temporarily to another 44.1k stream
                              Known to work as it closes and reopens the ALSA pcm device.
                            • Turn off sound effects.
                              I have known "woofer-dropout" to occur without even looking at a button, let alone hearing a sound effect. But its not the norm. So perhaps this would be 95% effective.
                            • Increase the number of ALSA sound buffers
                              By default the Radio sets up a 20ms buffer divided into two periods. I.E. 10ms each. So I guess while it's filling one half, the other half is playing out and cannot be filled.
                              If, for some reason, there's a delay in filling the only available buffer, we get under-run. (Perhaps due to some temporary cpu load increase.)
                              I seem to have had some success by increasing the buffer to 30ms, and dividing into three periods. Initial experimentation does suggest that it is more resilient to added load, perhaps one buffer is all it needs.
                              I'm hopeful that this might be a 95%+ effective solution, provided there are no other adverse effects.
                              Drawback is that there is no 'App' to do this, although one could be reasonably easily be made/cobbled together from existing sources.
                            • Increase jive_alsa's processing priority
                              I haven't tried this.


                            The biggest problem with investigating this is that I do not know how to reliably trigger woofer-dropout. But I can significantly increase the chance of its happening from twice a year to about twice in five minutes. So that helps. But it's tedious.

                            Second problem is that one needs ideally to run jive_alsa in debug/tinker mode to clarify some of whats going on. But ralphy has shown us the way forward, so I might look at that over the next few months.

                            Third problem is that source code for Crossover is not available. It's here, I think, that the problem lies. Specifically how it handles under-runs, pcm errors, etc.

                            The curious might like to try the following when their Radio next goes into woofer-dropout:

                            Log in to the Radio.
                            Code:
                            amixer sset Crossover off
                            This removes the Crossover plug-in from the ALSA chain. Sound now emerges from both tweeter & woofer, although not of good quality. (One will be receiving left channel, and the other the right channel.) So the underlying audio & chip seems to be working fine.
                            Code:
                            amixer sset Crossover on
                            This re-engages the plug-in, and we get back to woofer-dropout. That's disappointing, as I had hoped that by turning it off and then back on we might have reset the thing back to normal. Oh well.
                            Last edited by mrw; 2019-01-29, 17:20. Reason: Possibility of errant stream ?

                            Comment

                            • pbg4
                              Member
                              • Feb 2014
                              • 35

                              #44
                              Hi,

                              but the solution for the bass amp problem is already in this thread, see jive_alsa download from Ralphy above, since I have installed
                              his new jive_alsa version the problems here have nearly vanished completely,..

                              nearly because there was only one bass amp hickup here after playing full res flac with 44.1khz, setting the radio with the power button to
                              pause (i.e. not powering it down) and than starting the radio with the station button of a tvheadend sat radio stream mp2 with 48khz
                              and 320 kbit/s,

                              so in the last two month this was the only!! failure, instead of three to four times a week with daily usage, so I can live with that,
                              my thanks go to Ralphy for his jive_alsa remedy to the bass amp problem,

                              best wishes pbg4

                              Comment

                              • mrw
                                Senior Member
                                • May 2010
                                • 1083

                                #45
                                Originally posted by pbg4
                                but the solution for the bass amp problem is already in this thread, see jive_alsa download from Ralphy above, since I have installed
                                his new jive_alsa version the problems here have nearly vanished completely,..
                                Well, I'm very pleased for you ! But I do not share your finding.

                                My own 'Baby' is just as prone to 'woofer-dropout' with Ralphy's version as it is with the original Logitech version. In particular, the issue addressed by the 'Joggler Squeezeplay' patch has not been in point. Which is worth knowing.

                                And the error reporting is very much better !

                                I don't know if any of the other changes that Ralphy incorporated might have impacted on your circumstances.

                                Comment

                                Working...