- Jun 12, 2023
-
-
RK3588 AV1 decoder hardware block have resets lines and driver code already suppport it. Update yaml file to be aligned with this feature. Signed-off-by:
Benjamin Gaignard <benjamin.gaignard@collabora.com>
-
Mainlined RK3588 clock driver manage by itself the dependency between aclk/hclk and their root clocks (aclk_vdpu_root/hclk_vdpu_root). RK3588 av1 video decoder do not have to take car of it anymore so remove them from the list and be compliant with yaml bindings description. Fixes: 4cd96399 ("4cd96399") Signed-off-by:
Benjamin Gaignard <benjamin.gaignard@collabora.com>
-
Add node for AV1 video decoder. Signed-off-by:
Benjamin Gaignard <benjamin.gaignard@collabora.com> Signed-off-by:
Sebastian Reichel <sebastian.reichel@collabora.com>
-
AV1 film grain feature requires to use the postprocessor to produce valid frames. In such case the driver shouldn't propose native pixels format but only post-processed pixels format. Additionally if when setting a control a value could change capture queue pixels formats it is needed to call hantro_reset_raw_fmt(). Signed-off-by:
Benjamin Gaignard <benjamin.gaignard@collabora.com> Reviewed-by:
Nicolas Dufresne <nicolas.dufresne@collabora.com> Signed-off-by:
Sebastian Reichel <sebastian.reichel@collabora.com>
-
Add rk3588 AV1 decoder to Hantro variant. The hardware support image from 64x64 up to 7680x4320 by steps of 16 pixels. Signed-off-by:
Benjamin Gaignard <benjamin.gaignard@collabora.com> Reviewed-by:
Nicolas Dufresne <nicolas.dufresne@collabora.com> Signed-off-by:
Sebastian Reichel <sebastian.reichel@collabora.com>
-
Film grain feature add "old style" grain noise on decoded streams. Grain noise is applied after decoding by the postprocessor. The level of grain is based on gaussian sequence. Signed-off-by:
Benjamin Gaignard <benjamin.gaignard@collabora.com> Reviewed-by:
Nicolas Dufresne <nicolas.dufresne@collabora.com> Signed-off-by:
Sebastian Reichel <sebastian.reichel@collabora.com>
-
Implement AV1 stateless decoder for rockchip VPU981. It decode 8 and 10 bits AV1 bitstreams. AV1 scaling feature is done by the postprocessor. Signed-off-by:
Benjamin Gaignard <benjamin.gaignard@collabora.com> Reviewed-by:
Nicolas Dufresne <nicolas.dufresne@collabora.com> Signed-off-by:
Sebastian Reichel <sebastian.reichel@collabora.com>
-
AV1 hardware decoder needs entropy parameters to decode frames. They are computed from various arrays defined in AV1 section "9.4. Default CDF tables". Add helpers functions to init, store and get these parameters. Signed-off-by:
Benjamin Gaignard <benjamin.gaignard@collabora.com> Reviewed-by:
Nicolas Dufresne <nicolas.dufresne@collabora.com> Signed-off-by:
Sebastian Reichel <sebastian.reichel@collabora.com>
-
Compute the additional space required to store motion vectors at the end of the frames buffers. Signed-off-by:
Benjamin Gaignard <benjamin.gaignard@collabora.com> Reviewed-by:
Nicolas Dufresne <nicolas.dufresne@collabora.com> Signed-off-by:
Sebastian Reichel <sebastian.reichel@collabora.com>
-
The driver supports 8 and 10 bits bitstreams, make sure to discard other cases. It could happens that userland test if V4L2_CID_STATELESS_AV1_SEQUENCE exists without setting bit_depth field in this case use HANTRO_DEFAULT_BIT_DEPTH value. Signed-off-by:
Benjamin Gaignard <benjamin.gaignard@collabora.com> Reviewed-by:
Nicolas Dufresne <nicolas.dufresne@collabora.com> Signed-off-by:
Sebastian Reichel <sebastian.reichel@collabora.com>
-
Add AV1 decoder as new decoder mode to Hantro driver. Register needed AV1 controls for the decoder. Signed-off-by:
Benjamin Gaignard <benjamin.gaignard@collabora.com> Reviewed-by:
Nicolas Dufresne <nicolas.dufresne@collabora.com> Signed-off-by:
Sebastian Reichel <sebastian.reichel@collabora.com>
-
Let's the driver knows that V4L2_PIX_FMT_NV15_4L4 is a 10bits pixel format. Signed-off-by:
Benjamin Gaignard <benjamin.gaignard@collabora.com> Reviewed-by:
Nicolas Dufresne <nicolas.dufresne@collabora.com> Signed-off-by:
Sebastian Reichel <sebastian.reichel@collabora.com>
-
NV15_4L4 is the 10-bits per component 4x4 tiled format. Signed-off-by:
Benjamin Gaignard <benjamin.gaignard@collabora.com> Signed-off-by:
Nicolas Dufresne <nicolas.dufresne@collabora.com> Signed-off-by:
Sebastian Reichel <sebastian.reichel@collabora.com>
-
Fraction bytes-per-pixel exist for some packed format. You will find notably on Rockhip platform that 10bit data is stored fully packed, meaning that there is 1.25 pixels per bytes. This can be represented with the fraction 5/4 and can be used to scale the width into a bytesperline. Signed-off-by:
Nicolas Dufresne <nicolas.dufresne@collabora.com> Signed-off-by:
Benjamin Gaignard <benjamin.gaignard@collabora.com> Signed-off-by:
Sebastian Reichel <sebastian.reichel@collabora.com>
-
Make sure that bit_depth field of V4L2_CTRL_TYPE_AV1_SEQUENCE is initialized correctly before using it. Signed-off-by:
Benjamin Gaignard <benjamin.gaignard@collabora.com> Reviewed-by:
Nicolas Dufresne <nicolas.dufresne@collabora.com> Signed-off-by:
Sebastian Reichel <sebastian.reichel@collabora.com>
-
Add compatible for rk3588 AV1 vpu decoder. Signed-off-by:
Benjamin Gaignard <benjamin.gaignard@collabora.com> Acked-by:
Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org> Signed-off-by:
Sebastian Reichel <sebastian.reichel@collabora.com>
-
This patch adds the AOMedia Video 1 (AV1) kernel uAPI. This design is based on currently available AV1 API implementations and aims to support the development of AV1 stateless video codecs on Linux. Signed-off-by:
Daniel Almeida <daniel.almeida@collabora.com> Co-developed-by:
Nicolas Dufresne <nicolas.dufresne@collabora.com> Signed-off-by:
Nicolas Dufresne <nicolas.dufresne@collabora.com> Signed-off-by:
Hans Verkuil <hverkuil-cisco@xs4all.nl> Signed-off-by:
Sebastian Reichel <sebastian.reichel@collabora.com>
-
- Jun 11, 2023
-
-
rk3588-saradc isn't compatible with the rk3399-saradc variant, hence, fix the following dtbs_check warning for 'oneOf' condition failure. DTC_CHK arch/arm64/boot/dts/rockchip/rk3588-rock-5b.dtb /home/shreeya/linux/arch/arm64/boot/dts/rockchip/rk3588-rock-5b.dtb: saradc@fec10000: compatible: 'oneOf' conditional failed, one must be fixed: ['rockchip,rk3588-saradc'] is too short 'rockchip,saradc' was expected 'rockchip,rk3066-tsadc' was expected 'rockchip,rk3399-saradc' was expected Signed-off-by:
Shreeya Patel <shreeya.patel@collabora.com>
-
Add ADC support for ROCK 5B. Signed-off-by:
Shreeya Patel <shreeya.patel@collabora.com>
-
- Jun 05, 2023
-
-
Cristian Ciocaltea authored
The Rockchip one-time programmable memory driver provides access to various SoC specific information, e.g. leakage currents of the CPU/GPU/NPU components found on a RK3588 SoC. Enable the driver as built-in to allow client device drivers (e.g. cpufreq) to access the required data for proper settings adjustment. Signed-off-by:
Cristian Ciocaltea <cristian.ciocaltea@collabora.com>
-
Cristian Ciocaltea authored
The I2S0_8CH_MCLKOUT clock rate on Rock 5B board defaults to 12 MHz and it is used to provide the master clock (MCLK) for the ES8316 audio codec. On sound card initialization, this limits the allowed sample rates according to the MCLK/LRCK ratios supported by the codec, which results in the following non-standard rates: 15625, 30000, 31250, 46875. Hence, the very first access of the sound card fails: Broken configuration for playback: no configurations available: Invalid argument Setting of hwparams failed: Invalid argument However, all subsequent attempts will succeed, as the audio graph card will request a correct clock frequency, based on the stream sample rate and the multiplication factor. Assign MCLK to 12.288 MHz, which allows the codec to advertise most of the standard sample rates. Fixes: 55529fe3 ("arm64: dts: rockchip: Add rk3588-rock-5b analog audio") Signed-off-by:
Cristian Ciocaltea <cristian.ciocaltea@collabora.com>
-
Cristian Ciocaltea authored
When using the codec through the generic audio graph card, there are at least two calls of es8316_set_dai_sysclk(), with the effect of limiting the allowed sample rates according to the MCLK/LRCK ratios supported by the codec: 1. During audio card setup, to set the initial MCLK - see asoc_simple_init_dai(). 2. Before opening a stream, to update MCLK, according to the stream sample rate and the multiplication factor - see asoc_simple_hw_params(). In some cases the initial MCLK might be set to a frequency that doesn't match any of the supported ratios, e.g. 12287999 instead of 12288000, which is only 1 Hz below the supported clock, as that is what the hardware reports. This creates an empty list of rate constraints, which is further passed to snd_pcm_hw_constraint_list() via es8316_pcm_startup(), and causes the following error on the very first access of the sound card: $ speaker-test -D hw:Analog,0 -F S16_LE -c 2 -t wav Broken configuration for playback: no configurations available: Invalid argument Setting of hwparams failed: Invalid argument Note that all subsequent retries succeed thanks to the updated MCLK set at point 2 above, which uses a computed frequency value instead of a reading from the hardware registers. Normally this would have mitigated the issue, but es8316_pcm_startup() executes before the 2nd call to es8316_set_dai_sysclk(), hence it cannot make use of the updated constraints. Since es8316_pcm_hw_params() performs anyway a final validation of MCLK against the stream sample rate and the supported MCLK/LRCK ratios, fix the issue by ensuring that sysclk_constraints list is only set when at least one supported sample rate is autodetected by the codec. Fixes: b8b88b70 ("ASoC: add es8316 codec driver") Signed-off-by:
Cristian Ciocaltea <cristian.ciocaltea@collabora.com> Link: https://lore.kernel.org/r/20230530181140.483936-3-cristian.ciocaltea@collabora.com Signed-off-by:
Mark Brown <broonie@kernel.org>
-
Cristian Ciocaltea authored
The following error occurs when trying to restore a previously saved ALSA mixer state (tested on a Rock 5B board): $ alsactl --no-ucm -f /tmp/asound.state store hw:Analog $ alsactl --no-ucm -I -f /tmp/asound.state restore hw:Analog alsactl: set_control:1475: Cannot write control '2:0:0:ALC Capture Target Volume:0' : Invalid argument According to ES8316 datasheet, the register at address 0x2B, which is related to the above mixer control, contains by default the value 0xB0. Considering the corresponding ALC target bits (ALCLVL) are 7:4, the control is initialized with 11, which is one step above the maximum value allowed by the driver: ALCLVL | dB gain -------+-------- 0000 | -16.5 0001 | -15.0 0010 | -13.5 .... | ..... 0111 | -6.0 1000 | -4.5 1001 | -3.0 1010 | -1.5 .... | ..... 1111 | -1.5 The tests performed using the VU meter feature (--vumeter=TYPE) of arecord/aplay confirm the specs are correct and there is no measured gain if the 1011-1111 range would have been mapped to 0 dB: dB gain | VU meter % --------+----------- -6.0 | 30-31 -4.5 | 35-36 -3.0 | 42-43 -1.5 | 50-51 0.0 | 50-51 Increment the max value allowed for ALC Capture Target Volume control, so that it matches the hardware default. Additionally, update the related TLV to prevent an artificial extension of the dB gain range. Fixes: b8b88b70 ("ASoC: add es8316 codec driver") Signed-off-by:
Cristian Ciocaltea <cristian.ciocaltea@collabora.com> Link: https://lore.kernel.org/r/20230530181140.483936-2-cristian.ciocaltea@collabora.com Signed-off-by:
Mark Brown <broonie@kernel.org>
-
Cristian Ciocaltea authored
Add DT node for Rockchip RK3588/RK3588S OTP memory. Co-developed-by:
Finley Xiao <finley.xiao@rock-chips.com> Signed-off-by:
Finley Xiao <finley.xiao@rock-chips.com> Signed-off-by:
Cristian Ciocaltea <cristian.ciocaltea@collabora.com> Tested-by:
Vincent Legoll <vincent.legoll@gmail.com> [moved cpu-version subnode down, to be sorted by address] Link: https://lore.kernel.org/r/20230504200648.1119866-9-cristian.ciocaltea@collabora.com Signed-off-by:
Heiko Stuebner <heiko@sntech.de>
-
Cristian Ciocaltea authored
Add support for the OTP memory device found on the Rockchip RK3588 SoC. While here, remove the unnecessary 'void *' casts in the OF device ID table. Co-developed-by:
Finley Xiao <finley.xiao@rock-chips.com> Signed-off-by:
Finley Xiao <finley.xiao@rock-chips.com> Signed-off-by:
Cristian Ciocaltea <cristian.ciocaltea@collabora.com> Tested-by:
Vincent Legoll <vincent.legoll@gmail.com> Reviewed-by:
Heiko Stuebner <heiko@sntech.de> Signed-off-by:
Srinivas Kandagatla <srinivas.kandagatla@linaro.org>
-
Cristian Ciocaltea authored
Enhance error handling in the probe function by making use of dev_err_probe(), which ensures the error code is always printed, in addition to the specified error message. Signed-off-by:
Cristian Ciocaltea <cristian.ciocaltea@collabora.com> Tested-by:
Vincent Legoll <vincent.legoll@gmail.com> Reviewed-by:
Heiko Stuebner <heiko@sntech.de> Signed-off-by:
Srinivas Kandagatla <srinivas.kandagatla@linaro.org>
-
Cristian Ciocaltea authored
In preparation to support new Rockchip OTP memory devices having specific reset configurations, switch devm_reset_control_get() to devm_reset_control_array_get_exclusive(). Signed-off-by:
Cristian Ciocaltea <cristian.ciocaltea@collabora.com> Tested-by:
Vincent Legoll <vincent.legoll@gmail.com> Reviewed-by:
Heiko Stuebner <heiko@sntech.de> Signed-off-by:
Srinivas Kandagatla <srinivas.kandagatla@linaro.org>
-
Cristian Ciocaltea authored
In preparation to support additional Rockchip OTP memory devices with different register layout, generalize rockchip_otp_wait_status() to accept a new parameter for specifying the offset of the status register. Signed-off-by:
Cristian Ciocaltea <cristian.ciocaltea@collabora.com> Tested-by:
Vincent Legoll <vincent.legoll@gmail.com> Reviewed-by:
Heiko Stuebner <heiko@sntech.de> Signed-off-by:
Srinivas Kandagatla <srinivas.kandagatla@linaro.org>
-
Cristian Ciocaltea authored
In preparation to support new Rockchip OTP memory devices with different clock configurations and register layout, extend rockchip_data struct with the related members: clks, num_clks, reg_read. Additionally, to avoid managing redundant driver data, drop num_clks member from rockchip_otp struct and update all references to point to the equivalent member in rockchip_data. Signed-off-by:
Cristian Ciocaltea <cristian.ciocaltea@collabora.com> Tested-by:
Vincent Legoll <vincent.legoll@gmail.com> Reviewed-by:
Heiko Stuebner <heiko@sntech.de> Signed-off-by:
Srinivas Kandagatla <srinivas.kandagatla@linaro.org>
-
Cristian Ciocaltea authored
Document the OTP memory found on Rockchip RK3588 SoC. Since RK3588 uses different clocks & resets configurations than PX30 / RK3308, provide the required changes in the binding to be able to handle both variants. Signed-off-by:
Cristian Ciocaltea <cristian.ciocaltea@collabora.com> Reviewed-by:
Heiko Stuebner <heiko@sntech.de> Reviewed-by:
Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org> Signed-off-by:
Srinivas Kandagatla <srinivas.kandagatla@linaro.org>
-
Cristian Ciocaltea authored
Convert the Rockchip OTP memory bindings to dt-schema. Signed-off-by:
Cristian Ciocaltea <cristian.ciocaltea@collabora.com> Reviewed-by:
Heiko Stuebner <heiko@sntech.de> Reviewed-by:
Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org> Signed-off-by:
Srinivas Kandagatla <srinivas.kandagatla@linaro.org>
-
Cristian Ciocaltea authored
Add DT node for Rockchip RK3588/RK3588S SoC timer. Signed-off-by:
Cristian Ciocaltea <cristian.ciocaltea@collabora.com> Link: https://lore.kernel.org/r/20230419181309.338354-4-cristian.ciocaltea@collabora.com Signed-off-by:
Heiko Stuebner <heiko@sntech.de>
-
- Jun 04, 2023
-
-
Shreeya Patel authored
Add rockchip,rk3588-saradc compatible string. Signed-off-by:
Shreeya Patel <shreeya.patel@collabora.com>
-
Shreeya Patel authored
Add DT node for ADC support in RK3588 Signed-off-by:
Shreeya Patel <shreeya.patel@collabora.com>
-
Shreeya Patel authored
Use dev_err_probe instead of dev_err in probe function, which simplifies code a little bit and prints the error code. Signed-off-by:
Shreeya Patel <shreeya.patel@collabora.com>
-
Shreeya Patel authored
Match alignment with open parenthesis for improving the code readability. Signed-off-by:
Shreeya Patel <shreeya.patel@collabora.com> Reviewed-by:
AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com>
-
Shreeya Patel authored
Use of_device_get_match_data() to simplify the code. Signed-off-by:
Shreeya Patel <shreeya.patel@collabora.com> Reviewed-by:
AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com>
-
Shreeya Patel authored
Use devm_clk_get_enabled() to avoid manually disabling the clock. Signed-off-by:
Shreeya Patel <shreeya.patel@collabora.com>
-
Add new start and read functions to support rk3588 device. Also, add a device compatible string for the same. Signed-off-by:
Simon Xue <xxm@rock-chips.com> Signed-off-by:
Shreeya Patel <shreeya.patel@collabora.com> Reviewed-by:
AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com>
-
Add start, read and power_down callback functions, which will help in adding new rockchip device support cleanly. Signed-off-by:
Simon Xue <xxm@rock-chips.com> Signed-off-by:
Shreeya Patel <shreeya.patel@collabora.com>
-