Fixing sound sample rate issues - crackling audio etc

Discussion in 'Linux Ubuntu' started by lindsayhorner, Mar 30, 2014.

  1. lindsayhorner

    lindsayhorner New Member

    Joined:
    Mar 26, 2014
    Messages:
    4
    Likes Received:
    0
    Hi

    I've just been setting up Shairplay - https://github.com/abrasive/shairport - so my Udoo can function as a an Airplay receiver. It's all working really well and the only issue I've had to work around was an annoying crackle/pop/distortion which was occurring whilst playing back songs from my phone.

    The solution was easy, and it related to the sample rate of the mp3's I was playing (44Khz vs 48Khz). Note that this is whilst using the Udoo's internal sound card and speaker out, with ALSA handling the playback. You'll need to add a config file:

    Code:
    sudo nano ~/.asoundrc
    And then add this to it:
    Code:
    pcm.!default
    {
      type plug
      slave sl1
    }
    
    ctl.!default
    {
      type hw
      card 0
    }
    
    pcm_slave.sl1
    {
      pcm "hw:0,0"
      format S16_LE
      channels 2
      rate 44100
    }
    
    Hope this helps someone!
     

Share This Page