Hello,
For experimental reasons I'd like to disable the dma transfers on ssi1 using FIQ instead. I am able to transfer data out successfully to an SGTL5000 codec (using imx-sgtl5000.c as machine driver) with dma enabled. The imx6 is the bitclock and frame sync slave. In the devicetree I added "fsl,fiq-stream-filter" which I see in fsl_ssi.c is checked for and set's the variable use_dma to false. Are there any additional things to do besides changing the devicetree to get this to work? Thank you for any advice.
I'm using freescale linux version 3.14.28
imx6qdl.dtsi =
ssi1: ssi@02028000 { | ||||||||||
compatible = "fsl,imx6q-ssi","fsl,imx21-ssi"; | ||||||||||
reg = <0x02028000 0x4000>; | ||||||||||
interrupts = <0 46 IRQ_TYPE_LEVEL_HIGH>; | ||||||||||
clocks = <&clks IMX6QDL_CLK_SSI1_IPG>, | ||||||||||
<&clks IMX6QDL_CLK_SSI1>; | ||||||||||
clock-names = "ipg", "baud"; | ||||||||||
fsl,fiq-stream-filter; | ||||||||||
dmas = <&sdma 37 1 0>, | ||||||||||
<&sdma 38 1 0>; | ||||||||||
dma-names = "rx", "tx"; | ||||||||||
fsl,fifo-depth = <15>; | ||||||||||
fsl,ssi-dma-events = <38 37>; | ||||||||||
status = "okay"; | ||||||||||
}; |
i am also having same problem .
can anyone provide solution for the same ?
Hi,
According to the code and doducmentation it seems that's all you need.
Can you provide more details about the behavior you are facing?
/Alejandro
Hi Alejandro and thank you for responding,
I am using ssi1 to transmit out to a SGTL5000 codec. Alsa-utils and Alsa-lib version 1.0.27, fsl-alsa-plugins version 1.0.25. I did not make any changes to the machine driver or codec. If I enable dma for my ssi transfers I can do an "aplay -Dhw:0,0 Tone1000.wav" with no issues. No underruns and sound comes out. If I put in fsl,fiq-stream-filter as stated above (no other changes), I start getting underruns and no sound. See below verbose output of aplay. I'm not running any other programs at that point. I also did try to change the priority of aplay with nice and got the exact same results. I can provide any other information needed. THanks!
root@host:~/test# aplay -vvvv -Dhw:0,0 Tone1000.wav
Playing WAVE 'Tone1000.wav' : Signed 16 bit Little Endian, Rate 44100 Hz, Mono
Hardware PCM card 0 'imx6q-qmx6-sgtl5000' device 0 subdevice 0
Its setup is:
stream : PLAYBACK
access : RW_INTERLEAVED
format : S16_LE
subformat : STD
channels : 1
rate : 44100
exact rate : 44100 (44100/1)
msbits : 16
buffer_size : 22052
period_size : 5513
period_time : 125011
tstamp_mode : NONE
period_step : 1
avail_min : 5513
period_event : 0
start_threshold : 22052
stop_threshold : 22052
silence_threshold: 0
silence_size : 0
boundary : 1445199872
appl_ptr : 0
hw_ptr : 0
underrun!!! (at least 0.155 ms long)
Status:
state : XRUN
trigger_time: 1432670599.430402342
tstamp : 1432670599.430512009
delay : 0
avail : 22052
avail_max : 22052
underrun!!! (at least 0.085 ms long)
Status:
state : XRUN
trigger_time: 1432670599.807962342
tstamp : 1432670599.808041675
delay : 0
avail : 22052
avail_max : 22052
underrun!!! (at least 0.090 ms long)
Status:
state : XRUN
trigger_time: 1432670600.185433342
tstamp : 1432670600.185518009
delay : 0
avail : 22052
avail_max : 22052
underrun!!! (at least 0.085 ms long)
Status:
state : XRUN
trigger_time: 1432670600.562853675
tstamp : 1432670600.562933675
delay : 0
avail : 22052
avail_max : 22052
underrun!!! (at least 0.086 ms long)
Status:
state : XRUN
trigger_time: 1432670600.940244675
tstamp : 1432670600.940323675
delay : 0
avail : 22052
avail_max : 22052
underrun!!! (at least 0.087 ms long)
Status:
state : XRUN
trigger_time: 1432670601.317655009
tstamp : 1432670601.317736676
delay : 0
avail : 22052
avail_max : 22052
underrun!!! (at least 0.083 ms long)
Status:
state : XRUN
trigger_time: 1432670601.695046342
tstamp : 1432670601.695125009
delay : 0
avail : 22052
avail_max : 22052
underrun!!! (at least 0.064 ms long)
Status:
state : XRUN
trigger_time: 1432670602.72451009
tstamp : 1432670602.72510009
delay : 0
avail : 22052
avail_max : 22052
underrun!!! (at least 0.089 ms long)
Status:
state : XRUN
trigger_time: 1432670602.449829342
tstamp : 1432670602.449913342
delay : 0
avail : 22052
avail_max : 22052
underrun!!! (at least 0.089 ms long)
Status:
state : XRUN
trigger_time: 1432670602.827242342
tstamp : 1432670602.827326342
delay : 0
avail : 22052
avail_max : 22052
Here is my /proc/interrupts output:
Interrupt 78 is blank and increments by 11 during each attempt at running aplay so I assume this is somehow related to ssi.
root@cgtqmx6:/proc# cat interrupts
CPU0
34: 0 GIC 34 sdma
37: 0 GIC 37 2400000.ipu
38: 4 GIC 38 2400000.ipu
50: 0 GIC 50 vdoa
51: 0 GIC 51 rtc alarm
55: 0 GIC 55 mmc1
56: 528 GIC 56 mmc2
57: 0 GIC 57 mmc3
59: 2300 GIC 59 21e8000.serial
63: 4 GIC 63 2008000.ecspi
65: 0 GIC 65 2010000.ecspi
68: 545 GIC 68 21a0000.i2c
69: 284 GIC 69 21a4000.i2c
70: 78 GIC 70 21a8000.i2c
72: 30 GIC 72 2184200.usb
78: 22 GIC 78
81: 0 GIC 81 imx_thermal
82: 0 GIC 82 asrc
87: 13566 GIC 87 i.MX Timer Tick
112: 0 GIC 112 20bc000.wdog
139: 0 GIC 139 mmdc_1
150: 49111 GIC 150 2188000.ethernet
151: 0 GIC 151 2188000.ethernet
156: 0 GIC 156 20e4000.dcic
157: 0 GIC 157 20e8000.dcic
164: 0 gpio-mxc 4 2194000.usdhc cd
193: 0 gpio-mxc 1 key-menu
194: 0 gpio-mxc 2 key-back
195: 0 gpio-mxc 3 key-search
196: 0 gpio-mxc 4 key-home
198: 0 gpio-mxc 6 219c000.usdhc cd
253: 0 gpio-mxc 29 Power Button
261: 0 gpio-mxc 5 Volume Down
263: 0 gpio-mxc 7 Sleep Button
365: 0 gpio-mxc 13 Volume Up
FIQ: imx-ssi
IPI0: 0 CPU wakeup interrupts
IPI1: 0 Timer broadcast interrupts
IPI2: 0 Rescheduling interrupts
IPI3: 0 Function call interrupts
IPI4: 0 Single function call interrupts
IPI5: 0 CPU stop interrupts
IPI6: 0 IRQ work interrupts
IPI7: 0 completion interrupts
Err: 0