Project Home
Project Home
Source Code
Source Code
Documents
Documents
Wiki
Wiki
Discussion Forums
Discussions
Project Information
Project Info
Forum Topic - Sabrelite QNX6.6 Audio:deva error at runtime.: (4 Items)
   
Sabrelite QNX6.6 Audio:deva error at runtime.  
After applying patch 

patch-660-4024-applypatch.tar

My workspace does compile, but at run-time I get the following error:

   free malloc object that is not allocated:/builds/660_SDP/svn/lib/c/alloc/dlist.c:1121
   Unable to access /dev/snd

Is there something that needs to be updated within my environment.


deva code from the following build:

BSP_freescale-imx6q-sabrelite_br-660_be-660_SVN768950_JBN294


Thanks.

Chris.



Thanks.
Re: Sabrelite QNX6.6 Audio:deva error at runtime.  
I found the area that failed while initializing the audio.  The issue was variant.h where I modified MIN/MAX_SAMPLE_RATE
 from 48000 to 22050.  

After running sloginfo the following message came up

.........

Jan 01 00:00:53    1     7     0 Software Mixer re-config failed (capabilites missmatch)
Jan 01 00:00:53    1     7     0 ado_pcm_sw_mix: Failed to configure PCM software mixer
Jan 01 00:00:53    1     7     0 psw_destroy: Waiting for psw_thread to terminate...
Jan 01 00:00:53    1     7     0 psw_destroy: psw_thread termination complete
Jan 01 00:00:53    1     7     0 max98090: Failed to build software mixer
Jan 01 00:00:53    1     7     0 MX SSI: Unable to create codec mixer
Jan 01 00:00:53    1     7     0 my_detach_pulse: Deliver Exit pulse...
Jan 01 00:00:53    1     7     0 my_pulse_thread: Got Exit pulse...
Jan 01 00:00:53    1     7     0 my_detach_pulse: Deliver Exit pulse...
Jan 01 00:00:53    1     7     0 my_pulse_thread: Got Exit pulse...
Jan 01 00:00:53    1     7     0 init_card: unable to init dll deva-ctrl-mx-mx6q-sabrelite.so
Jan 01 00:00:53    1     7     0 C:/Users/olartc1/TeslaImage/logicpd_qnx660/src/hardware/deva/ctrl/../codecs/max98090/
max98090.c  max98090_destroy

.....


When I change the MIN/MAX_SAMPLE_RATE back to 48000, then everything works and I do not see the prior message.
Re: Sabrelite QNX6.6 Audio:deva error at runtime.  
The following function calls in deva-->codecs-->sgtl5000

	ado_mixer_set_reset_func (*mixer, (void *)sgtl5000_reset);
	ado_mixer_set_destroy_func (*mixer, (void *)sgtl5000_destroy);

	/* setup mixer controls for playback and capture */
	ado_pcm_chn_mixer (pcm1,
		ADO_PCM_CHANNEL_PLAYBACK, *mixer,
		ado_mixer_find_element (*mixer, SND_MIXER_ETYPE_PLAYBACK1, SND_MIXER_PCM_OUT, 0),
		ado_mixer_find_group (*mixer, SND_MIXER_MASTER_OUT, 0));
	

	ado_pcm_chn_mixer (pcm1,
		ADO_PCM_CHANNEL_CAPTURE, *mixer,
		ado_mixer_find_element (*mixer, SND_MIXER_ETYPE_CAPTURE1, SND_MIXER_ELEMENT_CAPTURE, 0),
		ado_mixer_find_group (*mixer, SND_MIXER_GRP_IGAIN, 0));

	/* allow audio chip to support multiple simultaneous streams */

	status = ado_pcm_sw_mix (card, pcm1, *mixer);

	ado_debug(DB_LVL_DRIVER, "status from ado_pcm_sw_mix = %d", status);


One of these ado_pcm/ado_mixer functions is failing when having the MAX/MIN_SAMPLE_RATE set to 22050


Thanks.
Re: Sabrelite QNX6.6 Audio:deva error at runtime. SOLVED  
Solved my issue by updating the ratelist within mxssi_dll.c-->ctrl_init() to include the sample rate that I am using.

ado_ctrl_dll_init_t ctrl_init;
int ctrl_init (HW_CONTEXT_T ** hw_context, ado_card_t * card, char *args)
{
...
#define NUM_RATES  (sizeof(ratelist) / sizeof(ratelist[0]))
	uint32_t ratelist[] = { SND_PCM_RATE_8000, SND_PCM_RATE_22050, SND_PCM_RATE_16000, SND_PCM_RATE_32000, 
SND_PCM_RATE_48000 };
.....



I no longer see the original error at bootup and I am able to playback and record audio.