[Vibrant General] motokochan:
Okay, so i was finally able to reproduce the issue today. I paired my stereo bluetooth headphones and the issue started again. However, it's not limited to that as I can reproduce it with my car's bluetooth connection as well.

Interesting bits from a logcat:

I connect the headphones and play a music file (using Meridian player):

I/AudioHardwareALSA( 2385): Initialized ALSA PLAYBACK device AndroidPlayback_Bluetooth_normal
D/AudioHardwareALSA( 2385): Set PLAYBACK PCM format to S16_LE (Signed 16 bit Little Endian)
D/AudioHardwareALSA( 2385): Using 2 channels for PLAYBACK.
D/AudioHardwareALSA( 2385): Set PLAYBACK sample rate to 44100 HZ
D/AudioHardwareALSA( 2385): Buffer size: 2048
D/AudioHardwareALSA( 2385): Latency: 46439

Looks normal. So, I disconnect the headphones and try to play out the speaker:

I/BTL-IFS ( 2874): send_ctrl_msg: [BTL_IFS CTRL] send BTLIF_DTUN_SIGNAL_EVT (CTRL) 11 pbytes (hdl 15)
W/BTLD ( 2874): btui_security_cback( LINK FAILURE:: hci status: 19) 8==link super to
W/BTLD ( 2874): for bd_addr: REMOVED_BT_MAC
I/DTUN_CLNT( 2956): dtun-rx signal [DTUN_SIG_DM_LINK_DOWN] (id 48) len 13
D/DTUN_HCID4( 2956): dtun_dm_sig_link_down()
I/DTUN_HCID4( 2956): dtun_dm_sig_link_down device = 0xfa28 handle = 275 reason = 19
I/BluetoothEventLoop.cpp( 2497): event_filter: Received signal org.bluez.Device:PropertyChanged from /org/bluez/2956/hci0/dev_REMOVED_BT_MAC
D/BluetoothEventLoop( 2497): Device property changed:REMOVED_BT_MAC property:Disconnected
D/BT HSHFP( 2595): Received intent Intent { act=android.bluetooth.device.action.ACL_DISCONNECTED (has extras) }
I/BT HSHFP( 2595): ACL disconnected
I/BluetoothService( 2497): ACL disconnected, mAclLinkCount = 0
D/BluetoothA2dpService( 2497): Received intent Intent { act=android.bluetooth.device.action.ACL_DISCONNECTED (has extras) }
I/BluetoothHIDService( 2497): Received intent Intent { act=android.bluetooth.device.action.ACL_DISCONNECTED (has extras) }, device = REMOVED_BT_MAC
I/BluetoothHIDService( 2497): ...ACL disconnected
E/MediaPlayer( 2497): message received msg=2, ext1=0, ext2=0
E/MediaPlayer( 2497): callback application
E/MediaPlayer( 2497): back from callback
I/AudioService( 2497): AudioFocus abandonAudioFocus() from android.media.AudioManager@47e0d548
W/BTLD ( 2874): dm_pm_timer expires
W/BTLD ( 2874): dm_pm_timer expires 0
W/BTLD ( 2874): proc dm_pm_timer expires
I/AudioHardwareALSA( 2385): Output standby called!!. Turn off PCM device.
...
D/AudioHardwareALSA( 2385):
D/AudioHardwareALSA( 2385): ALSA OPEN mode 0,device 128
I/AudioHardwareALSA( 2385): Try to open ALSA PLAYBACK device AndroidPlayback_Bluetooth_normal
I/AudioHardwareALSA( 2385): Initialized ALSA PLAYBACK device AndroidPlayback_Bluetooth_normal
D/AudioHardwareALSA( 2385): Set PLAYBACK PCM format to S16_LE (Signed 16 bit Little Endian)
D/AudioHardwareALSA( 2385): Using 2 channels for PLAYBACK.
D/AudioHardwareALSA( 2385): Set PLAYBACK sample rate to 44100 HZ
D/AudioHardwareALSA( 2385): Buffer size: 2048
D/AudioHardwareALSA( 2385): Latency: 46439

Looks like it's still trying to play out the disconnected BT device...

I plug in a pair of wired headphones (not a full headset), press the volume rocker button and see this:

V/HeadsetObserver( 2497): Headset UEVENT: {SUBSYSTEM=switch, SWITCH_STATE=2, DEVPATH=/devices/virtual/switch/h2w, SEQNUM=16078, ACTION=change, SWITCH_NAME=h2w}
I/HeadsetObserver( 2497): HEadSetObserver : newState =2, newName = h2w
I/HeadsetObserver( 2497): HEadSetObserver : newState == BIT_HEADSET_TV_OUT newState =2, newName = h2w
E/HeadsetObserver( 2497): tvout start
V/HeadsetObserver( 2497): Intent.ACTION_HEADSET_PLUG: state: 1 name: h2w mic: 0
I/FMRadioService( 2497): mReceiver: ACTION_HEADSET_PLUG
I/FMRadioService( 2497): ==> intent: Intent { act=android.intent.action.HEADSET_PLUG flg=0x40000000 (has extras) }
I/FMRadioService( 2497): state: 1
I/FMRadioService( 2497): name: h2w
V/TtySettingReceiver( 2595): state tty : false____state headset : true
...
E/AudioService( 2497): sendVolumeUpdate VOLUME_CHANGED_ACTION streamType = 2
D/BT HSHFP( 2595): Received intent Intent { act=android.media.VOLUME_CHANGED_ACTION (has extras) }
D/BluetoothA2dpService( 2497): Received intent Intent { act=android.media.VOLUME_CHANGED_ACTION (has extras) }
I/FMRadioService( 2497): mReceiver: VOLUME_CHANGED_ACTION
I/FMRadioService( 2497): stream: 2
I/FMRadioService( 2497): volume: 7
D/WindowManager( 2497): removeCallbacks-mVolumekeysInCallLongPress
I/KeyInputQueue( 2497): Input event
V/WindowManager( 2497): Dsptch to Window{47d565d0 com.sec.android.app.twlauncher/com.sec.android.app.twlauncher.Launcher paused=false}
E/AudioService( 2497): sendVolumeUpdate VOLUME_CHANGED_ACTION streamType = 2
D/BT HSHFP( 2595): Received intent Intent { act=android.media.VOLUME_CHANGED_ACTION (has extras) }
D/BluetoothA2dpService( 2497): Received intent Intent { act=android.media.VOLUME_CHANGED_ACTION (has extras) }
I/FMRadioService( 2497): mReceiver: VOLUME_CHANGED_ACTION
I/FMRadioService( 2497): stream: 2
I/FMRadioService( 2497): volume: 7
D/AudioHardwareALSA( 2385): AudioStreamOutALSA::setParameters() routing=10
D/AudioHardwareALSA( 2385):
D/AudioHardwareALSA( 2385): ALSA OPEN mode 0,device 10
I/AudioHardwareALSA( 2385): Try to open ALSA PLAYBACK device AndroidPlayback_Speaker_Headphone_normal
I/AudioHardwareALSA( 2385): Initialized ALSA PLAYBACK device AndroidPlayback_Speaker_Headphone_normal
D/AudioHardwareALSA( 2385): Set PLAYBACK PCM format to S16_LE (Signed 16 bit Little Endian)
D/AudioHardwareALSA( 2385): Using 2 channels for PLAYBACK.
D/AudioHardwareALSA( 2385): Set PLAYBACK sample rate to 44100 HZ
D/AudioHardwareALSA( 2385): Buffer size: 2048
D/AudioHardwareALSA( 2385): Latency: 46439

Now it's playing out the speaker.

Looks like something's possibly forgetting to switch to the right playback device. I could be wrong in the suspicion as I'm very inexperienced with Android internals. I welcome review by someone more experienced and would be glad to provide a full logcat output in private if needed.

I'll also be sending this data off to Samsung.