From 13c4a30c180298fafe8e909cccf1b192b433e120 Mon Sep 17 00:00:00 2001 From: tytung Date: Tue, 1 Nov 2011 01:31:54 +0800 Subject: [PATCH] sound: ALSA: htcleo: try to fix the sound crash. --- arch/arm/mach-msm/qdsp6_1550/q6audio.c | 16 ++++------------ 1 file changed, 4 insertions(+), 12 deletions(-) diff --git a/arch/arm/mach-msm/qdsp6_1550/q6audio.c b/arch/arm/mach-msm/qdsp6_1550/q6audio.c index 53828035..c256a2b9 100644 --- a/arch/arm/mach-msm/qdsp6_1550/q6audio.c +++ b/arch/arm/mach-msm/qdsp6_1550/q6audio.c @@ -211,7 +211,6 @@ static struct q6audio_analog_ops *analog_ops = &default_analog_ops; static uint32_t tx_clk_freq = 8000; static int tx_mute_status = 0; static int rx_vol_level = 100; -static int tx_vol_level = 100; static char acdb_file[64] = "default.acdb"; static uint32_t tx_acdb = 0; static uint32_t rx_acdb = 0; @@ -2099,21 +2098,14 @@ int q6audio_set_tx_dev_volume(int device_id, int level) int q6audio_set_tx_volume(int level) { - uint32_t adev; int vol; - if (q6audio_init()) - return 0; - - if (level < 0 || level > 100) - return -EINVAL; + AUDIO_INFO("%s\n", __func__); mutex_lock(&audio_path_lock); - adev = ADSP_AUDIO_DEVICE_ID_VOICE; - vol = q6_device_volume(audio_rx_device_id, level); - audio_tx_mute(ac_control, adev, 0); - audio_tx_volume(ac_control, adev, vol); - tx_vol_level = level; + vol = q6_device_volume(audio_tx_device_id, level); + audio_tx_volume(ac_control, audio_tx_device_id, vol); + //_update_audio_tx_volume(ac_control, audio_tx_device_id); mutex_unlock(&audio_path_lock); return 0;