This patch bring back property 'rockchip,bclk-fs' to allow
user to set it from DT, though we can set it from machine
driver or by 'BCLK_Ratio' control.
Signed-off-by: Sugar Zhang <sugar.zhang@rock-chips.com>
Change-Id: Id50833a8899782ac4aac34e146a424b9f6da590d
This patch allow user to set bclk-ratio by kcontrols.
Signed-off-by: Sugar Zhang <sugar.zhang@rock-chips.com>
Change-Id: I6ddf153bc5fd7558e3ba5d4138739a477d9facc6
ALSA core blocks userspace for 10 seconds for PCM R/W default.
Consider the situation BT-slave which acts as SLAVE mode, when
BT-master offline sometime, the CLK lost, user have to wait the
core timeout(10s), it's quite bad experience.
This patch allows userspace to override the WAIT_TIME to recover
more quickly from terminal audio stream. especially for stream
which have no mechanism to detect the LINK offline.
Usage:
/# amixer -c 0 contents | grep Wait
numid=43,iface=PCM,name='PCM Read Wait Time MS'
numid=44,iface=PCM,name='PCM Write Wait Time MS'
/# amixer -c 0 cset numid=43 500
numid=43,iface=PCM,name='PCM Read Wait Time MS'
; type=INTEGER,access=rw------,values=1,min=0,max=10000,step=1
: values=500
Signed-off-by: Sugar Zhang <sugar.zhang@rock-chips.com>
Change-Id: I36c03859d3d91552dc4247864fe6697624245b6c
This patch add support for keeping BCLK / FSYNC always on.
it's required by some devices, such as HDMI, PA, etc.
For example: on HDMI situation
There are some TVs require maintaining N/CTS packets or AUDS
packets to keep audio logic active, otherwise, the first tone
may be lost.
In order to optimize the user experience, we need to ensure
continuous transmission of N/CTS and AUDS packets from the
HDMI-TX, so that the SINK TV devices can maintain audio logic
activation, promptly process audio data, and achieve the
completeness of the first tone.
We init a 48k I2S-STANDARD clock timing as default.
Signed-off-by: Sugar Zhang <sugar.zhang@rock-chips.com>
Change-Id: Icdf2101c4117bc0ec4c05343e7317477cc02d6c0
* commit 'e86a496684236d1747856eada1af8c2045df2b62':
drm/rockchip: lvds: add dual lvds left right mode support
drm/rockchip: lvds: add support lvds1 for rk3567
drm/rockchip: vop2: update for dual lvds
Change-Id: I66e2a940be36976be7e44b73b213ef76f8bd3c74
* commit 'cdb78165b4d008e04049cae65f0c3bfd759aa694':
cpufreq: dt-platdev: Add rk3567 project into blacklist
soc: rockchip: cpuinfo: Add support for rk3567
video: rockchip: rga3: changing to close acquire_fence_fd in user-space
video: rockchip: rga3: add check_csc
video: rockchip: rga3: add full_csc clip config
video: rockchip: rga3: add full_csc enable
video: rockchip: rga3: compatible with legacy global alpha config
video: rockchip: rga3: replace magic numbers with enum
video: rockchip: rga3: support fg/bg global alpha
mfd: display-serdes: add serdes display driver support base on mfd arch
phy: rockchip-inno-usb2: fix USB OTG not working in HOST mode for RK3328
arm64: dts: rockchip: rk3528: Remove ddc gpio control during hotplug
Change-Id: I5d6fc00274914a330f673cee5cbcbdbeb3ddd325
There will be many hdmirx devices in Rockchip SOCs
Here create a hdmirx class for those hdmirx devices
Signed-off-by: Shunhua Lan <lsh@rock-chips.com>
Change-Id: Id47af8a01b94c37e2bc40c5671f64cf9f3deebee
pm_wakeup_pending will return 1 after system wakeup, witch makes
the failure of disable_secondary_cpus when virtual poweroff.
So we need to do pm_wakeup_clear before disable_secondary_cpus.
Signed-off-by: XiaoDong Huang <derrick.huang@rock-chips.com>
Change-Id: I96722898d22cd2c2ad8229e44b9ecbfa9024a2e4
Considering the MCLK is not a MUST for codec, but the SCLK is.
So, let's add SCLK as iomux-route switch.
Signed-off-by: Sugar Zhang <sugar.zhang@rock-chips.com>
Change-Id: I7010268ee4d2ee43670bb7fc118f4a39ab24a666
Considering the MCLK is not a MUST for codec, but the SCLK is.
So, let's add SCLK as iomux-route switch.
Still keep the MCLK as iomux-route switch to allow the pin can
be used individually.
Signed-off-by: Sugar Zhang <sugar.zhang@rock-chips.com>
Change-Id: Iab96f63ab93a5429c6b76dc1b0cb3c9d5e43d2e4
Considering the MCLK is not a MUST for codec, but the SCLK is.
So, let's add SCLK as iomux-route switch.
Still keep the MCLK as iomux-route switch to allow the pin can
be used individually.
Change-Id: I855cd399ada956434a820db06ca586de986caa11
Signed-off-by: XiaoTan Luo <lxt@rock-chips.com>
Signed-off-by: Sugar Zhang <sugar.zhang@rock-chips.com>
This patch add audio reset in prepare stage to clean audio FIFO
to recover sound from XRUN state.
Change-Id: I3808be7973306cc6f8d377f5eb5a0bcec844ab16
Signed-off-by: Sugar Zhang <sugar.zhang@rock-chips.com>
This patch add support PATHx controls which allow user
can select PATHx dynamically.
Signed-off-by: Sugar Zhang <sugar.zhang@rock-chips.com>
Change-Id: Ie7d286ed60363734bc25bf3127daab0d8fcc7144
This patch use add_component_controls instead of dai's one
to support multiple instance with name_prefix.
Signed-off-by: Sugar Zhang <sugar.zhang@rock-chips.com>
Change-Id: I5e4872991eb1115ef0f56aba0635cde817fd31b8
This patch bring back property 'rockchip,bclk-fs' to allow
user to set it from DT, though we can set it from machine
driver or by 'BCLK_Ratio' control.
Signed-off-by: Sugar Zhang <sugar.zhang@rock-chips.com>
Change-Id: Id50833a8899782ac4aac34e146a424b9f6da590d
This patch allow user to set bclk-ratio by kcontrols.
Signed-off-by: Sugar Zhang <sugar.zhang@rock-chips.com>
Change-Id: I6ddf153bc5fd7558e3ba5d4138739a477d9facc6
ALSA core blocks userspace for 10 seconds for PCM R/W default.
Consider the situation BT-slave which acts as SLAVE mode, when
BT-master offline sometime, the CLK lost, user have to wait the
core timeout(10s), it's quite bad experience.
This patch allows userspace to override the WAIT_TIME to recover
more quickly from terminal audio stream. especially for stream
which have no mechanism to detect the LINK offline.
Usage:
/# amixer -c 0 contents | grep Wait
numid=43,iface=PCM,name='PCM Read Wait Time MS'
numid=44,iface=PCM,name='PCM Write Wait Time MS'
/# amixer -c 0 cset numid=43 500
numid=43,iface=PCM,name='PCM Read Wait Time MS'
; type=INTEGER,access=rw------,values=1,min=0,max=10000,step=1
: values=500
Signed-off-by: Sugar Zhang <sugar.zhang@rock-chips.com>
Change-Id: I36c03859d3d91552dc4247864fe6697624245b6c
This patch add support for keeping BCLK / FSYNC always on.
it's required by some devices, such as HDMI, PA, etc.
For example: on HDMI situation
There are some TVs require maintaining N/CTS packets or AUDS
packets to keep audio logic active, otherwise, the first tone
may be lost.
In order to optimize the user experience, we need to ensure
continuous transmission of N/CTS and AUDS packets from the
HDMI-TX, so that the SINK TV devices can maintain audio logic
activation, promptly process audio data, and achieve the
completeness of the first tone.
We init a 48k I2S-STANDARD clock timing as default.
Signed-off-by: Sugar Zhang <sugar.zhang@rock-chips.com>
Change-Id: Icdf2101c4117bc0ec4c05343e7317477cc02d6c0
This patch use add_component_controls instead of dai's one
to support multiple instance with name_prefix.
Signed-off-by: Sugar Zhang <sugar.zhang@rock-chips.com>
Change-Id: Ideb9af565f8b44dffaa32f88fed412c5781bcaed
ALSA core blocks userspace for 10 seconds for PCM R/W default.
Consider the situation BT-slave which acts as SLAVE mode, when
BT-master offline sometime, the CLK lost, user have to wait the
core timeout(10s), it's quite bad experience.
This patch allows userspace to override the WAIT_TIME to recover
more quickly from terminal audio stream. especially for stream
which have no mechanism to detect the LINK offline.
Usage:
/# amixer -c 0 contents | grep Wait
numid=43,iface=PCM,name='PCM Read Wait Time MS'
numid=44,iface=PCM,name='PCM Write Wait Time MS'
/# amixer -c 0 cset numid=43 500
numid=43,iface=PCM,name='PCM Read Wait Time MS'
; type=INTEGER,access=rw------,values=1,min=0,max=10000,step=1
: values=500
Signed-off-by: Sugar Zhang <sugar.zhang@rock-chips.com>
Change-Id: I53a35344238557813ea3683dd19474819e987d19
This patch add support PATHx controls which allow user
can select PATHx dynamically.
Signed-off-by: Sugar Zhang <sugar.zhang@rock-chips.com>
Change-Id: I9c3af821f9080ec2a07ed846ad059f68c82ec74f
This patch use add_component_controls instead of dai's one
to support multiple instance with name_prefix.
Signed-off-by: Sugar Zhang <sugar.zhang@rock-chips.com>
Change-Id: I5aed3ba8e071544154f39b92c1180bbda0afe767
name_prefix should be assigned before dai probe to support
add_component_controls in probe routine.
Fixes: e92cb0063f ("ASoC: rockchip: multi-dais: Add support controls for sub dais")
Signed-off-by: Sugar Zhang <sugar.zhang@rock-chips.com>
Change-Id: I056ad90c877be16467f25c7cbd90d682b223b58a
HDMIRX enable PKTDEC_AVIIF_CHG_IRQ to detect whether
color_range/color_space/color_fmt change or not,
but other aviif changes also cause the interrupt to trigger.
Change-Id: I7add2a6b519ad97e74ad3ba64dd8961e46a32584
Signed-off-by: Wangqiang Guo <kay.guo@rock-chips.com>
the return value 0 of the func wait_event_interruptible() means success.
Fixes: eecc48ce7b ("video: rockchip: mpp: disable usr poll timeout")
Signed-off-by: Yandong Lin <yandong.lin@rock-chips.com>
Change-Id: I849625aecb6713d0f4f8652f69ae9335d56d8b65
We get a report that a wireless ethernet device which uses legacy interrupt, exposes a
buggy behaviour when patching RT support. It can be observed on RK3588 EVB1 with NVMe under
RT environment when adding pci=nomsi to cmdline. The backtrace looks like below:
echo 3 > /proc/sys/vm/drop_caches && dd if=/dev/nvme0n1 of=/dev/null bs=1M count=50000
[ 10.826850] irq 155: nobody cared (try booting with the "irqpoll" option)
[ 10.826862] CPU: 0 PID: 0 Comm: swapper/0 Not tainted 5.10.160-rt89 #505
[ 10.826867] Hardware name: Rockchip RK3588 EVB1 LP4 V10 Board (DT)
[ 10.826870] Call trace:
[ 10.826871] dump_backtrace+0x0/0x1e0
[ 10.826881] show_stack+0x18/0x24
[ 10.826886] dump_stack_lvl+0xcc/0xf8
[ 10.826891] dump_stack+0x18/0x54
[ 10.826895] __report_bad_irq+0x4c/0xdc
[ 10.826899] note_interrupt+0x2cc/0x380
[ 10.826905] handle_irq_event+0x10c/0x180
[ 10.826909] handle_simple_irq+0xac/0x120
[ 10.826913] generic_handle_irq+0x30/0x50
[ 10.826917] rk_pcie_legacy_int_handler+0xa8/0x160
[ 10.826923] __handle_domain_irq+0xb8/0x140
[ 10.826927] gic_handle_irq+0xd8/0x2e4
[ 10.826932] el1_irq+0xcc/0x180
[ 10.826935] arch_cpu_idle+0x18/0x3c
[ 10.826940] default_idle_call+0x2c/0x9c
[ 10.826944] do_idle+0x21c/0x2a0
[ 10.826949] cpu_startup_entry+0x24/0x70
[ 10.826952] rest_init+0xd0/0xe0
[ 10.826956] arch_call_rest_init+0x10/0x1c
[ 10.826960] start_kernel+0x50c/0x544
[ 10.826963] handlers:
[ 10.826965] [<0000000015317c1f>] irq_default_primary_handler threaded [<00000000edb1561e>] pcie_pme_irq
[ 10.826977] [<0000000015317c1f>] irq_default_primary_handler threaded [<000000000065643b>] nvme_irq
[ 10.826988] [<0000000015317c1f>] irq_default_primary_handler threaded [<000000000065643b>] nvme_irq
[ 10.826996] Disabling IRQ #155
And NVMe can't work anymore due to the irq problem. The actual problem looks like:
nvme_irq nvme_irq
//process the previous request
-> nvme_process_cq(nvmeq) // the previous one is still processing
-> if(nvme_process_cq(nvmeq))
-> return IRQ_HANDLED -> return IRQ_NONE
so a spurious irq was counted and if the irq ack time is short enough to increase the spurious
irq exceeding the limitation, report_bad_irq was triggered. This is why the bug was only observed
under RT environment since the irq was distributed more quickly than ever, but the bug was always there.
root@linaro-alip:/# cat /proc/irq/155/spurious
count 8990
unhandled 24339
last_unhandled 189829 ms
This can be fixed by the drivers as we could see many patches regarding "irq xxx: nobody cared",
and it's the case if we don't allow nvme_irq to nest itself or postpone the handler. However the
legacy interrupt support is also buggy. For legacy interrupt, it's a level irq rather than an edge
one. But it happened to work because Rockchip PCIe RC only generates oneshot irq instead of level,
preventing the irq storm from happening. So changing to use handle_level_irq is correct and should
help mask/unmask the irq when dealing with it in between. That's a decent solution for all.
Signed-off-by: Shawn Lin <shawn.lin@rock-chips.com>
Change-Id: Ie9499b3dbd19ac053500b4c726294296be537ffd