<!DOCTYPE html>
<html>
  <head>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
  </head>
  <body>
    <p>Hello,</p>
    <p>maybe you don't have the alsa config for pulseaudio. Normally
      aplay -L<br>
      shows that the default device points to pulse:</p>
    <p>null<br>
          Discard all samples (playback) or generate zero samples
      (capture)<br>
      default<br>
          Playback/recording through the PulseAudio sound server<br>
    </p>
    <p>...</p>
    <p>pulse<br>
          PulseAudio Sound Server<br>
    </p>
    <p>...<br>
    </p>
    <p>I guess the Moode audio player tries to access the ALSA device
      directly<br>
      and fails because the device is already in use by pulseaudio.
      There might<br>
      also be a configuration option in the player to make it use pulse.
      <br>
    </p>
    <p>Regards<br>
                    Georg<br>
    </p>
    On 07.05.24 18:34, Richard Reina wrote:<br>
    <blockquote type="cite"
cite="mid:CAKLxnzY3d7P3XdEax2CooKv1JVY1R21HPLKzsg14cOV_9HTv_g@mail.gmail.com">
      <meta http-equiv="content-type" content="text/html; charset=UTF-8">
      <div dir="ltr">Yes it's a requirement. Setting the audio device to
        pulse in Ledfx is the only way it will work. <br>
      </div>
      <br>
      <div class="gmail_quote">
        <div dir="ltr" class="gmail_attr">El mar, 7 may 2024 a las
          11:21, Mark Gaiser (<<a href="mailto:markg85@gmail.com"
            moz-do-not-send="true" class="moz-txt-link-freetext">markg85@gmail.com</a>>)
          escribió:<br>
        </div>
        <blockquote class="gmail_quote"
style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
          <div dir="ltr">
            <div>Have you tried changing your device in ledfx to pulse?</div>
            <div><a
href="https://ledfx.readthedocs.io/en/latest/directing_audio.html"
                target="_blank" moz-do-not-send="true"
                class="moz-txt-link-freetext">https://ledfx.readthedocs.io/en/latest/directing_audio.html</a><br>
            </div>
            <div><br>
            </div>
            <div>Again no idea if this works, I don't know nor use ledfx
              :) Just trying to help out.</div>
            <br>
            <div class="gmail_quote">
              <div dir="ltr" class="gmail_attr">On Tue, May 7, 2024 at
                6:14 PM Richard Reina <<a
                  href="mailto:gatorreina@gmail.com" target="_blank"
                  moz-do-not-send="true" class="moz-txt-link-freetext">gatorreina@gmail.com</a>>
                wrote:<br>
              </div>
              <blockquote class="gmail_quote"
style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
                <div dir="ltr">
                  <div>Hi Mark,</div>
                  <div><br>
                  </div>
                  <div>Thank you for the reply.  paplay also works but
                    there's no change. It's not the playing of the song
                    that locks up the device and causes Moode audio not
                    to be able to use it, it's the starting of ledfx.
                    Once I do systemctl start ledfx the moode audio
                    player can no longer use the output device
                    regardless if I play a sound file with aplay, paplay
                    or don't play a sound file at all. Moode audio can't
                    use the device until I do systemctl stop ledfx.</div>
                </div>
                <br>
                <div class="gmail_quote">
                  <div dir="ltr" class="gmail_attr">El mar, 7 may 2024 a
                    las 10:48, Mark Gaiser (<<a
                      href="mailto:markg85@gmail.com" target="_blank"
                      moz-do-not-send="true"
                      class="moz-txt-link-freetext">markg85@gmail.com</a>>)
                    escribió:<br>
                  </div>
                  <blockquote class="gmail_quote"
style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
                    <div dir="ltr">
                      <div>Can you use paplay instead?</div>
                      <div>That is the pulseaudio aplay drop-in
                        replacement.</div>
                      <div>I'm guessing you won't have "device or
                        resource busy" errors when using paplay.</div>
                      <div><br>
                      </div>
                      <div>I did not test this! But do let us know if it
                        works for you :)</div>
                      <div dir="ltr"><br>
                      </div>
                      <div dir="ltr">On Tue, May 7, 2024 at 3:24 PM
                        Richard Reina <<a
                          href="mailto:gatorreina@gmail.com"
                          target="_blank" moz-do-not-send="true"
                          class="moz-txt-link-freetext">gatorreina@gmail.com</a>>
                        wrote:<br>
                      </div>
                      <div class="gmail_quote">
                        <blockquote class="gmail_quote"
style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
                          <div dir="ltr">
                            <div>
                              <p>I have a Raspberry Pi 3b with a
                                Hifiberry Amp4/DAC hat runs Moode Audio
                                OS.</p>
                              <p>If I pick <code>Pulse</code> as they
                                audio device in LedFx and play a sound
                                file with <code>aplay sound_file.wav</code>
                                my leds react to the music.</p>
                              <p>The problem is that after <code>aplay</code>
                                has finished playing the sound file if I
                                then go try to use Moode audio player
                                Moode audio won't play music and gives
                                me the following error:</p>
                              <p><code>MPD error Failed to open "ALSA
                                  Default" (alsa); Failed to open ALSA
                                  device "_audioout": Device or resource
                                  busy</code></p>
                              <p>This persists until I stop Ledfx. Is
                                there a way I can switch back and forth
                                between aplay and Moode Audio player
                                without having to stop and start Ledfx?
                                I am not looking to get LedFx working
                                with Moode I only want reactive lights
                                when I play a song with <code>aplay</code>.</p>
                              <p>$ aplay -l <br>
                              </p>
                              <p>**** List of PLAYBACK Hardware Devices
                                **** <br>
                              </p>
                              <p>card 0: sndrpihifiberry
                                [snd_rpi_hifiberry_dacplus], device 0:
                                HiFiBerry DAC+ HiFi pcm512x-hifi-0
                                [HiFiBerry DAC+ HiFi pcm512x-hifi-0] <br>
                              </p>
                              <p>Subdevices: 0/1 <br>
                              </p>
                              <p>Subdevice #0: subdevice #0</p>
                              <p>$ amixer<br>
                                Simple mixer control 'Master',0<br>
                                  Capabilities: pvolume pswitch
                                pswitch-joined<br>
                                  Playback channels: Front Left - Front
                                Right<br>
                                  Limits: Playback 0 - 65536<br>
                                  Mono:<br>
                                  Front Left: Playback 65536 [100%] [on]<br>
                                  Front Right: Playback 65536 [100%]
                                [on]<br>
                                Simple mixer control 'Capture',0<br>
                                  Capabilities: cvolume cswitch
                                cswitch-joined<br>
                                  Capture channels: Front Left - Front
                                Right<br>
                                  Limits: Capture 0 - 65536<br>
                                  Front Left: Capture 65536 [100%] [on]<br>
                                  Front Right: Capture 65536 [100%] [on]<br>
                              </p>
                            </div>
                          </div>
                        </blockquote>
                      </div>
                    </div>
                  </blockquote>
                </div>
              </blockquote>
            </div>
          </div>
        </blockquote>
      </div>
    </blockquote>
  </body>
</html>