Skip to content

Conversation

@d3adme4t
Copy link
Owner

Pull VPU

frank-w and others added 7 commits August 22, 2022 16:55
2-channel is working:
speaker-test -Dhw:CARD=Analog,DEV=0 -c2 -t wav

4-channel output is not mapped to stereo (rear not hearable)
speaker-test -Dhw:CARD=Analog,DEV=0 -c4 -t wav

record works too with some noise
arecord -f cd -Dhw:CARD=Analog,DEV=0 test.wav
aplay test.wav

still only board-mic working, not headphone-mic

HP-Det gpio is always 0, also with pull up pinctrl config

pdm is not usable as it uses same pinctrl as i2s1, but onboard mic working

root@bpi-r2pro:~# dmesg | grep i2s
[    1.455383] rockchip-pinctrl pinctrl: pin gpio1-11 already requested by fe440000.pdm; cannot claim for fe410000.i2s
[    1.456222] rockchip-pinctrl pinctrl: pin-43 (fe410000.i2s) status -22
[    1.456699] rockchip-pinctrl pinctrl: could not request pin 43 (gpio1-11) from group i2s1m0-sdi0  on device rockchip-pinctrl
[    1.457587] rockchip-i2s-tdm fe410000.i2s: Error applying setting, reverse things back

i2s1m0_sdi0 => 1 RK_PB3 => pdmm0_sdi0
root@bpi-r2pro:~# dmesg -w | grep -i 'head\|hook'
[    1.053323] rockchip_headset rk-headset: Can not read property hook_gpio
[    1.053381] rockchip_headset rk-headset: headset have hook adc mode
[    1.053385] DEBUG: rk_headset_adc_probe 399
[    1.053390] DEBUG: rk_headset_adc_probe 406
[    1.053474] DEBUG: rk_headset_adc_probe 429
[    1.053483] DEBUG: rk_headset_adc_probe 436
[    1.053568] input: rk-headset as /devices/platform/rk-headset/input/input1
[    1.053756] DEBUG: rk_headset_adc_probe 447 ret:0
[    1.053761] DEBUG: rk_headset_adc_probe 452
[    1.053765] DEBUG: rk_headset_adc_probe 457
[    1.054101] DEBUG: rk_headset_adc_probe 478
[    1.054106] DEBUG: rk_headset_adc_probe 483

[  127.246942] In the headset_interrupt
[  127.406034] headset_interrupt:get pin level again, pin=114,i=0
[  127.406034] headset_interrupt:get pin level again, pin=114,i=0
[  127.406051] (headset in is high level)headset status is in
[  127.610050] hook_once_work read adc value: 1023
[  127.610307] hook_once_work notice android headset status = 1
[  127.714012] DEBUG: hook_work_callback 329

...

[  131.874090] hook_work_callback read adc value=1023
[  131.874111] HOOK status is up , adc value = 1023 hook_time = 100
[  131.874125] Hook adc read old_status == headset->hook_status=0 hook_time = 100
[  131.929130] In the headset_interrupt
[  131.978009] DEBUG: hook_work_callback 329
[  131.978088] hook_work_callback read adc value=1023
[  131.978100] Headset is out or waiting for headset is in or out, after same time check HOOK key
[  132.086063] headset_interrupt:get pin level again, pin=114,i=0
[  132.086063] headset_interrupt:get pin level again, pin=114,i=0
[  132.086091] (headset in is high level)headset status is out
[  132.086218] headset notice android headset status = 0
input device not updated because headset->hook_status is always 0 (up)

when plugging in headset:
[  124.674145] (headset in is high level)headset status is in
[  124.674148] DEBUG headset_interrupt:172
[  124.878108] hook_once_work read adc value: 1023
[  124.878367] hook_once_work notice android headset status = 1
[  124.982038] DEBUG: hook_work_callback 332
[  124.982138] hook_work_callback read adc value=1023
[  124.982162] HOOK status is up , adc value = 1023 hook_time = 100
[  124.982176] Hook adc read old_status == headset->hook_status=0 hook_time = 100 (no input update!)
...
and out:
[  129.211037] In the headset_interrupt
[  129.246052] DEBUG: hook_work_callback 332
[  129.246149] hook_work_callback read adc value=1023
[  129.246164] Headset is out or waiting for headset is in or out, after same time check HOOK key
[  129.370185] headset_interrupt:get pin level again, pin=114,i=0
[  129.370185] headset_interrupt:get pin level again, pin=114,i=0
[  129.370200] (headset in is high level)headset status is out
[  129.370203] DEBUG headset_interrupt:193 isMic:1 hook_status:0 (==DOWN=1?)
[  129.370324] headset notice android headset status = 0
RK356x has Hantro G1 video decoder capable to decode MPEG2/H.264/VP8
video formats.

This patch enables RK356x video decoder in RK356x device-tree
include.

Tested on [1] with FFmpeg v4l2_request code taken from [2]
with MPEG2, H.642 and VP8 samples with results [3].

[1] https://github.com/warpme/minimyth2
[2] https://github.com/LibreELEC/LibreELEC.tv/blob/master/packages/multimedia/ffmpeg/patches/v4l2-request/ffmpeg-001-v4l2-request.patch
[3] https://github.com/warpme/minimyth2/blob/master/video-test-summary.txt

Signed-off-by: Piotr Oniszczuk <piotr.oniszczuk@gmail.com>
Reviewed-by: Ezequiel Garcia <ezequiel@vanguardiasur.com.ar>
@d3adme4t d3adme4t merged commit 2d6e01c into d3adme4t:6.0-rc Aug 23, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants