1
0
Fork 0

android: tinyalsa_hal: fixes out device for nanopi6 box

Signed-off-by: hmz007 <hmz007@gmail.com>
master
hmz007 2 years ago
parent a64c7839a0
commit e936813e6d

@ -925,7 +925,9 @@ static void open_sound_card_policy(struct stream_out *out)
bool support = ((out->config.rate == 44100) || (out->config.rate == 48000));
struct audio_device *adev = out->dev;
if (support) {
if(adev->dev_out[SND_OUT_SOUND_CARD_SPEAKER].card != SND_OUT_SOUND_CARD_UNKNOWN) {
if (out->device & (AUDIO_DEVICE_OUT_WIRED_HEADPHONE | AUDIO_DEVICE_OUT_WIRED_HEADSET)) {
// nothing
} else if(adev->dev_out[SND_OUT_SOUND_CARD_SPEAKER].card != SND_OUT_SOUND_CARD_UNKNOWN) {
out->device |= AUDIO_DEVICE_OUT_SPEAKER;
}

Loading…
Cancel
Save