diff --git a/amp/src/aal/sound/sound_api.c b/amp/src/aal/sound/sound_api.c index 7cf0a06..b6799c0 100755 --- a/amp/src/aal/sound/sound_api.c +++ b/amp/src/aal/sound/sound_api.c @@ -2950,6 +2950,7 @@ HRESULT AMP_SND_SetStreamVolume(HANDLE hStream, UINT uiVolume) SNDSTRM_CHECKVALID(hStream); pStream = (SND_STRM*) hStream; volume = AMP_SND_VOL_L2E(uiVolume); + pStream->uiStreamVolume = uiVolume; stAppParam._d = AMP_APP_PARAIDX_VOLUME; stAppParam._u.stVolume.uiVolume = volume; #ifdef CONFIG_AMP_AUDIO_GAIN_RANGE_EXTENSION @@ -3485,8 +3486,14 @@ HRESULT AMP_SND_SetStreamMute(AMP_IN HANDLE hStream, AMP_IN BOOL bMute) { #ifdef CONFIG_AMP_AUDIO_MUTE_PT_FOR_STREAM SNDLOGD("HDMI pass through case, stream volume is set to AOUT!\n"); +#if 1 //tony debug + SNDLOGE("tony restore volume even for HDMI passthrough ! restore volume target:[%d] \n", pStream->uiStreamVolume); + AMP_RPC(rc, AMP_SNDSINK_SetAoutStreamVolume, pStream->hSndSinkComp, + HDMI_PATH, bMute? 0: (pStream->uiStreamVolume==0 ? 0:0x40000000L)); +#else AMP_RPC(rc, AMP_SNDSINK_SetAoutStreamVolume, pStream->hSndSinkComp, HDMI_PATH, bMute? 0: 0x40000000L); +#endif if (rc != SUCCESS) { SNDLOGE("Fail to set aout stream volume with handle[0x%x]\n", hStream);