[TouchPad Development] superbonbon:
Audio Issue in Nougat?

Maybe someone out there can shed some light on a sound issue I'm having. I've had sound problems on various builds in the past but everything seemed to get fixed with one of the major CM updates, can't remember which.

Anyway, did a clean slate install of 7.0 and couldn't get any sound out of the speakers or the headphones. Bluetooth works just fine but no amount of cajoling gets any love out of the onboard audio. Tried installing Viper and just about every sound toggling app from the play store and nothing worked. Was able to install a headphone jack notifier and it indicated headphones being plugged in at all times. Decided to go back to the very beginning. Performed a complete restore to factory via some novaterm trickery and the original webOS Doctor. Sound works as expected, although it does have an issue where once headphones are plugged in sound will not switch back over to the speakers once headphones are unplugged.

Performed the Toolbox Android install after a clean wipe with the previously linked CM12.1 (2016-01-09 version) and again had sound working properly. I went ahead and performed the upgrade to the latest 7.1 nightly version and the sound problem has returned. Logs show a few things of interest:

In logcat (small sample of many):

11-26 09:22:18.836 V/audio_hw_primary( 157): select_devices: out_off odev,idev=0x4,0x0 out/spkr/hp=001 in/imic/wmic=000
11-26 09:22:18.836 I/audio_hw_primary( 157): audio_route_apply_path: speaker-disable
11-26 09:22:18.836 I/audio_hw_primary( 157): audio_route_apply_path: headphone-disable
11-26 09:22:18.837 I/audio_hw_primary( 157): audio_route_apply_path: out-disable
11-26 09:22:23.198 V/audio_hw_primary( 157): out_set_parameters kvpairs='routing=4'
11-26 09:22:23.202 V/audio_hw_primary( 157): start_output_stream
11-26 09:22:23.237 V/audio_hw_primary( 157): select_devices: out_on odev,idev=0x4,0x0 out/spkr/hp=101 in/imic/wmic=000
11-26 09:22:23.237 I/audio_hw_primary( 157): audio_route_apply_path: headphone-enable
11-26 09:22:23.238 I/audio_hw_primary( 157): audio_route_apply_path: speaker-disable
11-26 09:22:23.239 I/audio_hw_primary( 157): audio_route_apply_path: out-enable
11-26 09:22:26.496 V/audio_hw_primary( 157): do_out_standby
11-26 09:22:26.639 V/audio_hw_primary( 157): select_devices: out_off odev,idev=0x4,0x0 out/spkr/hp=001 in/imic/wmic=000
11-26 09:22:26.639 I/audio_hw_primary( 157): audio_route_apply_path: speaker-disable
11-26 09:22:26.639 I/audio_hw_primary( 157): audio_route_apply_path: headphone-disable
11-26 09:22:26.641 I/audio_hw_primary( 157): audio_route_apply_path: out-disable
11-26 09:22:27.962 V/audio_hw_primary( 157): out_set_parameters kvpairs='routing=4'
11-26 09:22:27.963 V/audio_hw_primary( 157): start_output_stream
11-26 09:22:27.999 V/audio_hw_primary( 157): select_devices: out_on odev,idev=0x4,0x0 out/spkr/hp=101 in/imic/wmic=000
11-26 09:22:27.999 I/audio_hw_primary( 157): audio_route_apply_path: headphone-enable
11-26 09:22:28.000 I/audio_hw_primary( 157): audio_route_apply_path: speaker-disable
11-26 09:22:28.000 I/audio_hw_primary( 157): audio_route_apply_path: out-enable
11-26 09:22:28.488 V/audio_hw_primary( 157): out_set_parameters kvpairs='routing=4'
11-26 09:22:31.591 V/audio_hw_primary( 157): do_out_standby

In dmesg (small sample of many):

[ 821.451263] msm_device_put:device speaker_stereo_rx set 1
[ 821.741058] msm_device_put:device speaker_stereo_rx set 1
[ 822.308654] msm_device_put:device speaker_stereo_rx set 1
[ 828.110076] msm_device_put:device speaker_stereo_rx set 0
[ 830.648864] msm_device_put:device speaker_stereo_rx set 1

Does anyone else have those messages with the same frequency? Could I have a hardware issue on the headphone jack? Any reason I get sound in previous OS versions?

Logs attached. Thanks!