At the title screen, hold up and left (diagonal), start, select, A, and B all at the same time (simultaneously). The screen should then turn blue, followed by the sound test. It is very important that these buttons are all held. While held, the screen will blink from black to blue. Release them when the screen as soon as the screen "begins to change blue" or the title screen will appear again.
For the second sound test, at the title screen, wait for the title screen to fade. As soon as it fades, press start and the title screen will re-appear. Allow it to fade once more and again, press start. Now press up and left (diagonal), start, select, A and B. Use the same proceedure as the previous code to activate this one (hold all buttons and wait for the screen to blink and fade from black to blue).