RetroPie forum home
    • Recent
    • Tags
    • Popular
    • Home
    • Docs
    • Register
    • Login
    Please do not post a support request without first reading and following the advice in https://retropie.org.uk/forum/topic/3/read-this-first

    Need help getting I2S audio to work

    Scheduled Pinned Locked Moved Help and Support
    help & supporti2s audiopi 4
    15 Posts 2 Posters 2.2k Views
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • mituM
      mitu Global Moderator
      last edited by

      The output looks ok, seems the configuration is applied. Can you run

      amixer scontents
      

      and post the output ? Make sure you don't have any $HOME/.asoundrc file present, if it's there then delete it.

      J 1 Reply Last reply Reply Quote 0
      • J
        Jackslayerr @mitu
        last edited by

        @mitu said in Need help getting I2S audio to work:

        amixer scontents

        Ok, got rid of the file and ran the command.

        pi@retropie:~ $ amixer scontents
        Simple mixer control 'PCM',0
          Capabilities: volume
          Playback channels: Front Left - Front Right
          Capture channels: Front Left - Front Right
          Limits: 0 - 255
          Front Left: 255 [100%]
          Front Right: 255 [100%]
        
        
        1 Reply Last reply Reply Quote 0
        • mituM
          mitu Global Moderator
          last edited by

          The output seems correct, does alsamixer still throws an error ?

          J 1 Reply Last reply Reply Quote 0
          • J
            Jackslayerr @mitu
            last edited by Jackslayerr

            @mitu Now it does work and the audio is at 100. The sound card is set to default and the speaker test says it's doing something but I don't hear anything

            pi@retropie:~ $ speaker-test
            
            speaker-test 1.1.8
            
            Playback device is default
            Stream parameters are 48000Hz, S16_LE, 1 channels
            Using 16 octaves of pink noise
            Rate set to 48000Hz (requested 48000Hz)
            Buffer size range from 2229 to 8916
            Period size range from 1114 to 1115
            Using max buffer size 8916
            Periods = 4
            was set period_size = 1114
            was set buffer_size = 8916
             0 - Front Left
            Time per period = 2.834187
             0 - Front Left
            Time per period = 2.995269
             0 - Front Left
            Time per period = 2.995473
             0 - Front Left
            
            

            and it keeps on doing that. Maybe my speaker itself is bad? Here are the specs of it

            Size: 20x30x7mm
            Impedance:8ohm
            Rate Input Power: 1.5W
            Max Input Power: 2.0W
            Wire Length: 10cm

            1 Reply Last reply Reply Quote 0
            • mituM
              mitu Global Moderator
              last edited by

              speaker-test would output just some white-noise, but at 100% volume it should be audible.
              As for the speaker - if it works with other sources, then it should be ok. Don't have experience with the I2S hardware, so can't help here I'm afraid. As far as the software configuration is concerned, you're fine.

              J 1 Reply Last reply Reply Quote 0
              • J
                Jackslayerr @mitu
                last edited by

                @mitu When I used this speaker before I had another audio module that worked with an audio jack and it worked. So this is a hardware problem? If it is then I don't know what I'm doing wrong because everything looks fine

                1 Reply Last reply Reply Quote 0
                • mituM
                  mitu Global Moderator
                  last edited by mitu

                  @Jackslayerr said in Need help getting I2S audio to work:

                  So this is a hardware problem?

                  Could be, as I said everything else on the Pi side looks fine.

                  You can try an audio-oriented distro like Volumio, which has an easier to cofigure UI for all kind of models of I2S chips. Flash the image on your sdcard and set-it up, then test to see if it's working.

                  EDIT: it could be that the configuration is correct, but the AMP needs a different overlay configuration - without hifiberry-dac. The doc is dated 2017 and could be dated.

                  J 1 Reply Last reply Reply Quote 0
                  • J
                    Jackslayerr @mitu
                    last edited by

                    @mitu How would I give the AMP a different overlay configuration?

                    mituM 1 Reply Last reply Reply Quote 0
                    • mituM
                      mitu Global Moderator @Jackslayerr
                      last edited by

                      @Jackslayerr There's an overlay called max98357 which might be of help. See here.
                      On the other hand, you say you have a _ raspberry pi model b_ - is this a Pi1 ?

                      J 1 Reply Last reply Reply Quote 0
                      • J
                        Jackslayerr @mitu
                        last edited by

                        @mitu Pi4 and I’ll check it out

                        1 Reply Last reply Reply Quote 0
                        • First post
                          Last post

                        Contributions to the project are always appreciated, so if you would like to support us with a donation you can do so here.

                        Hosting provided by Mythic-Beasts. See the Hosting Information page for more information.