I have a simple component that plays a song when I pull the input pin high. It operates at 3V and everything works fine when I provide power from my bench power supply(I can also see that it draws 0.15A current when operating). I want to build it into a product that has a 5V 2.1A adapter as a power supply so I added an LM317T voltage regulator. I configured the regulator with R1=390Ω and R2=560Ω according to Figure 6. of the datasheet and when I test the output without load it does provide 3V but when I use it to drive the audio component the output voltage drops to ~2V and the audio is played in a slow and distorted way. At first I just had these two resistors but since then I also added all the recommended capacitors(but not the recommended protection diodes, Figure 7.) but it still has the same behavior. According to the datasheet the LM317T should be able to provide 2.2A of current. My questions are: what am I doing wrong and how to fix it?
@Justme: Normal speaker not a piezo(8Ω 0.5w)
@audioguru: I'll test that and get back to you but I doubt it, it should be able to provide 2.1A