PaulStoffregen / Audio

Teensy Audio Library
http://www.pjrc.com/teensy/td_libs_Audio.html
1.1k stars 408 forks source link

sgtl5000: headphoneSelect correct bits #468

Open elgiano opened 11 months ago

elgiano commented 11 months ago

Fixes headphoneSelect: we are currently writing 1 to select DAC and 0 to select LINEIN. However, SGTL5000 datasheet (page 39) says the opposite:

Select the headphone input.
0x0 = DAC
0x1 = LINEIN

And in fact I observe the wrong behavior: I get LINEIN out when calling headphoneSelect(AUDIO_HEADPHONES_DAC), and DAC out when calling heaphoneSelect(AUDIO_HEADPHONES_LINEIN). This PR fixes it.