This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

Sitara Linux SDK 7.0 and jackd. Infinity alsa_pcm xrun problem

Hello,

I use a AM33х EVMSK board for prototyping audio network device, based on jackd solution as an audio channels switcher and packetizer. I use one direction streaming (from PC to EVMSK) and use a PC as a capture device with jackd and my own network sending client, and EVMSK as playback device with jackd and my own network receiveing client also. I have found unexpected behaviour. After different amount of time (usuall 10-15 min) I got infinity xrun state of alsa pcm and sometimes full CPU load sometimes not.

I start investigation and found that it's not depends on jackd version (checked last few versions including git snapshot) but depends on linux SDK version. Everythnig is working well with Sitara Linux SDK 6.0 during days with no xrun at all, but will be broken guaranteed after 30 min (usually faster) with linux SDK 7.0

I have cheked version of alsa (/proc/sound/version) and found difference, it's Advanced Linux Sound Architecture Driver Version k3.12.10-ti2013.12.01 for SDK 7.0 and Advanced Linux Sound Architecture Driver Version 1.0.24 for SDK 6.0. Could be the problem in alsa?

I would like to use 3.12 linux and Sitara SDK 7.0 because of device tree support and etc., but can't use it because of subject. Do anybody have ideas about next steps? I see following options: check and compare Codec driver in both versions and make custom build of latest version or version 1.0.24 of alsa for checking with SDK 7.0

I should say that I have 25-30% average CPU load on EVMSK for decoding and playing audio streams so I have enough gap for stable work and with SDK6.0 it's definitely work.

Any ideas?

  • Hi Tim,

    Thanks for describing this issue in detail. It has been forwarded to the factory team for investigation.

  • Hi Tim,

    Thanks for the detailed description.  Can you ping the SK after it reaches this point where the cpu is maxed?  If the device is no longer responsive on the network, it might mean that we are dealing with a network driver problem as opposed to ALSA.


    Regards,

    Josh

  • Hi Josh!

    Actually I'm watching three different situations with SDK7.0:

    1. infinity alsa_pcm xrun loop, with not extremly high CPU load, both consoles either USB or SSH work well. Ping works. I can kill and restart jackd and network clients.

    2. infinity alsa_pcm xrun loop, with extremly high CPU load, both consoles either USB or SSH work very-very slow. Ping works (but I should check answer delay, I think it should be bigger then in case 1). Hard to kill and restart jackd and clients due to slow responce, but possible.

    3. everything stops, including touchscreen. Ping does not work, both consoles don't work neither USB nor SSH. Not possible to restart jackd and network clients because of consoles stoping. I use reset button for exiting from this situation

  • Dear Josh!

    I also repeat case #1 with SDK7 just running:

    jackd -d alsa
    jack_connect system:capture_1 system:playback_1
    jack_connect system:capture_2 system:playback_2
    

    without my network client, so it's definetly not my own network client issue

    Please note, that I add line-in jack to EVMSK and modify dts in SDK7 and board file in SDK6 for capturing sound, using this post http://e2e.ti.com/support/arm/sitara_arm/f/791/t/242199.aspx

  • Hi Tim,

    Thanks for the extra details.  I'm still a bit stumped, but we will poke around a bit more to see if we can get to the bottom of this.

    Can you post the contents of your McASP node in the device tree file for the Starter Kit?  Here's an example of what I'm looking for: http://processors.wiki.ti.com/index.php/Sitara_SDK_Linux_Audio_Porting_Guide#McASP_Configuration

    Furthermore, can you tell me what your corresponding settings are in your board file for SDK 6.0?  There is a similar structure to what you see in Device Tree that has all of these parameters.

    Regards,

    Josh

  • parts of my SDK7.0 dts file:

    sound {
    			compatible = "ti,da830-evm-audio";
    			ti,model = "AM335x-EVMSK";
    			ti,audio-codec = <&tlv320aic3106>;
    			ti,mcasp-controller = <&mcasp1>;
    			ti,codec-clock-rate = <24000000>;
    			ti,audio-routing =
    				"Headphone Jack",       "HPLOUT",
    				"Headphone Jack",       "HPROUT";
    		};
    &mcasp1 {
    		pinctrl-names = "default", "sleep";
    		pinctrl-0 = <&mcasp1_pins>;
    		pinctrl-1 = <&mcasp1_sleep_pins>;
    
    		status = "okay";
    
    		op-mode = <0>;          /* MCASP_IIS_MODE */
    		tdm-slots = <2>;
    		/* 16 serializer */
    		serial-dir = <  /* 0: INACTIVE, 1: TX, 2: RX */
    			0 0 1 2
    		>;
    		tx-num-evt = <32>;
    		rx-num-evt = <32>;
    };
    

    Parts of my SDK 6.0 board file:

    static u8 am335x_evm_sk_iis_serializer_direction1[] = {
    	INACTIVE_MODE,	INACTIVE_MODE,	TX_MODE,	RX_MODE,
    	INACTIVE_MODE,	INACTIVE_MODE,	INACTIVE_MODE,	INACTIVE_MODE,
    	INACTIVE_MODE,	INACTIVE_MODE,	INACTIVE_MODE,	INACTIVE_MODE,
    	INACTIVE_MODE,	INACTIVE_MODE,	INACTIVE_MODE,	INACTIVE_MODE,
    };
    
    static struct snd_platform_data am335x_evm_sk_snd_data1 = {
    	.tx_dma_offset	= 0x46400000,	/* McASP1 */
    	.rx_dma_offset	= 0x46400000,
    	.op_mode	= DAVINCI_MCASP_IIS_MODE,
    	.num_serializer	= ARRAY_SIZE(am335x_evm_sk_iis_serializer_direction1),
    	.tdm_slots	= 2,
    	.serial_dir	= am335x_evm_sk_iis_serializer_direction1,
    	.asp_chan_q	= EVENTQ_2,
    	.version	= MCASP_VERSION_3,
    	.txnumevt	= 32,
            .rxnumevt       = 32,
    	.get_context_loss_count	=
    			omap_pm_get_dev_context_loss_count,
    };
    

  • Dear Josh!

    I have provided requested information. Any chance for get under way?