[HTC Rezound] dlumberg:
So into the kernel I go...

Looking at the kmsg I can see some things are getting called but then others aren't and I tracked down where the black hole is. It's either a race condition with something that's resetting the voice route or a memory leak that's causing the route to crash. This section of kmsg has a lot of repeated entries much like the ACDB lines in logcat.

in q6voice.c

static int voice_setup_modem_voice(struct voice_data *v)

is getting called

kmsg shows

is showing up but

isn't

so in apr.c

int apr_send_pkt(void *handle, uint32_t *buf)

calls

w_len = apr_tal_write(clnt->handle, buf, hdr->pkt_size);

Which looks like this loop

int apr_tal_write(struct apr_svc_ch_dev *apr_ch, void *data, int len)
{
int rc = 0, retries = 0;

if (!apr_ch->ch)
return -EINVAL;

do {
if (rc == -EAGAIN)
udelay(50);

rc = __apr_tal_write(apr_ch, data, len);
} while (rc == -EAGAIN && retries++ < 300);

if (rc == -EAGAIN)
pr_aud_err("apr_tal: TIMEOUT for write\n");

return rc;
}

I'm guessing that this loop never completes or something else crashes it and it resets the audio route to the handset and tries again.

I have NO experience with kernel code so maybe somebody who understands it could take a peak and let me know if I'm totally off base.

kmsg

<6>[ 55.652770] [msm8x60.c:msm_device_put] device bt_sco_tx set 1
<6>[ 55.652893] [AUD] snd_soc_msm8x60: [ALSA] msm_en_device (dev bt_sco_tx, id 38, enable 1, opened 0)
<6>[ 55.653076] [AUD] snd_soc_msm8x60: device freq =0
<6>[ 55.653198] [AUD] q6voice: auddev_cb_function, evt_id=2,
<6>[ 55.653381] [AUD] q6voice: topology=69489 , tx_port_id=3, rx_port_id=2
<6>[ 55.655273] [AUD] q6voice: 100c4 0
<6>[ 55.655883] [AUD] q6voice: 110fb 0
<6>[ 55.656311] [AUD] q6voice: 110fb 0
<6>[ 55.656738] [AUD] q6voice: 110fb 0
<6>[ 55.657257] [AUD] q6voice: 110fb 0
<6>[ 55.657714] [AUD] q6voice: 110fb 0
<6>[ 55.658142] [AUD] q6voice: 110fb 0
<6>[ 55.658386] [AUD] q6voice: voice_send_cvp_cal_to_modem: CVP calib
<6>[ 55.658874] [AUD] q6voice: 110e3 0
<6>[ 55.659027] [AUD] q6voice: voice_send_cvp_cal_to_modem: CVP calib
<6>[ 55.659637] [AUD] q6voice: 110e3 0
<6>[ 55.659790] [AUD] q6voice: voice_send_cvp_cal_to_modem: CVP calib
<6>[ 55.660369] [AUD] q6voice: 110e3 0
<6>[ 55.660522] [AUD] q6voice: voice_send_cvp_cal_to_modem: CVP calib
<6>[ 55.661102] [AUD] q6voice: 110e3 0
<6>[ 55.661224] [AUD] q6voice: voice_send_cvp_cal_to_modem: CVP calib
<6>[ 55.661712] [AUD] q6voice: 110e3 0
<6>[ 55.661956] [AUD] q6voice: voice_send_cvp_cal_to_modem: CVP calib
<6>[ 55.662475] [AUD] q6voice: 110e3 0
<6>[ 55.663299] [AUD] q6voice: 110e4 0
<6>[ 55.663818] [AUD] q6voice: 110e4 0
<6>[ 55.664306] [AUD] q6voice: 110e4 0
<6>[ 55.664855] [AUD] q6voice: 110e4 0
<6>[ 55.665557] [AUD] q6voice: 110e4 0
<6>[ 55.666046] [AUD] q6voice: 110e4 0
<6>[ 55.671691] [AUD] q6voice: 100c6 0
<6>[ 55.673034] [msm8x60.c:msm_device_put] device bt_sco_rx set 1
<6>[ 55.673217] [AUD] snd_soc_msm8x60: [ALSA] msm_en_device (dev bt_sco_rx, id 37, enable 1, opened 1)
<6>[ 55.673461] [AUD] snd_soc_msm8x60: [ALSA] msm_set_voice_rx_vol: volume 0
<6>[ 55.673645] [AUD] q6voice: auddev_cb_function, evt_id=16,
<6>[ 55.674468] [AUD] q6voice: 110ee 0
<6>[ 55.674682] [AUD] snd_soc_msm8x60: [ALSA] msm_route_stream: session 1, dev 37, enable 1
<6>[ 55.674926] [AUD] audio_dev_ctl: msm_snddev_set_dec, topology = 0x10000001
<6>[ 55.675201] [AUD] q6adm: Topology = 10000001
<6>[ 55.680023] [AUD] q6adm: send_adm_cal
<6>[ 55.680175] [AUD] q6adm: send_adm_cal: Sending audproc cal, acdb_path 0
<6>[ 55.680450] [AUD] audio_acdb: get_audproc_cal, path = 0
<6>[ 55.680603] [AUD] q6adm: send_cal: Sending SET_PARAMS payload = 0x404d9000, size = 220
<6>[ 55.681579] [AUD] q6adm: send_adm_cal: Sending audvol cal, acdb_path 0
<6>[ 55.681823] [AUD] audio_acdb: get_audvol_cal, path = 0
<6>[ 55.681976] [AUD] q6adm: send_cal: Sending SET_PARAMS payload = 0x404dd000, size = 228
<6>[ 55.682861] [AUD] pcm_out: pcm_event_listner: AUDDEV_EVT_DEV_RDY, id = 2
<6>[ 55.683074] [AUD] snd_soc_msm8x60: [ALSA] msm_set_voice_rx_vol: volume 0
<6>[ 55.683105] [AUD] pcm_out: pcm_out_ioctl: AUDIO_START
<6>[ 55.683349] [AUD] q6voice: auddev_cb_function, evt_id=16,
<6>[ 55.683959] [AUD] q6voice: 110ee 0