danielotero / linux-on-hi10

My attempt to provide full Linux support to Chuwi Hi10 Pro
53 stars 10 forks source link

Sound HI 10 plus / rt5651 #11

Closed Carsuzan closed 5 years ago

Carsuzan commented 6 years ago

I m doing a fresh Ubuntu 18.04 on my Chuwi HI 10 Plus. Kernel is 4.15.0-20-generic #21-Ubuntu SMP Under pulse audio pavucontrol i have only a virtual device and no physical one. When playing music with audacious i get no sound neither from internal speaker or from head set despite pavucontrol vumeter show sound activity.

inxi -xxAv6

System: Host: Chwui Kernel: 4.15.0-20-generic x86_64 bits: 64 gcc: 7.3.0 Desktop: Gnome 3.28.1 (Gtk 3.22.30-1ubuntu1) dm: gdm3 Distro: Ubuntu 18.04 LTS Machine: Device: desktop System: CHUWI INNOVATION AND (SHENZHEN) product: Hi10 plus tablet v: Hampoo_reserve serial: N/A Mobo: Hampoo model: Cherry Trail CR v: V100 serial: N/A UEFI: American Megatrends v: 5.11 date: 10/12/2017 CPU: Quad core Intel Atom x5-Z8350 (-MCP-) arch: Airmont rev.4 cache: 1024 KB flags: (lm nx sse sse2 sse3 sse4_1 sse4_2 ssse3 vmx) bmips: 11520 clock speeds: min/max: 480/1920 MHz 1: 1674 MHz 2: 1520 MHz 3: 1319 MHz 4: 1226 MHz Memory: Using dmidecode: root required for dmidecode Graphics: Card: Intel Atom/Celeron/Pentium Processor x5-E8000/J3xxx/N3xxx Series PCI Configuration Registers bus-ID: 00:02.0 chip-ID: 8086:22b0 Display Server: x11 (X.Org 1.19.6 ) driver: i915 Resolution: 1920x1280@60.00hz OpenGL: renderer: Mesa DRI Intel HD Graphics (Cherrytrail) version: 4.5 Mesa 18.0.0-rc5 (compat-v: 3.0) Direct Render: Yes Audio: Card bytcr-rt5651 driver: bytcr-rt5651 Sound: Advanced Linux Sound Architecture v: k4.15.0-20-generic

I saw tips regarding speaker activation and got following results sudo ./chuwispeaker [sudo] Mot de passe de jpm : Using gpio 362 Could not write gpio pin: Operation not permitted ls -l /sys/class/gpio total 0 --w------- 1 root root 4096 mai 6 09:33 export lrwxrwxrwx 1 root root 0 mai 6 15:24 gpio362 -> ../../devices/platform/INT33FF:01/gpiochip1/gpio/gpio362 lrwxrwxrwx 1 root root 0 mai 6 09:33 gpiochip225 -> ../../devices/platform/INT0002:00/gpio/gpiochip225 lrwxrwxrwx 1 root root 0 mai 6 09:33 gpiochip228 -> ../../devices/platform/INT33FF:03/gpio/gpiochip228 lrwxrwxrwx 1 root root 0 mai 6 09:33 gpiochip314 -> ../../devices/platform/INT33FF:02/gpio/gpiochip314 lrwxrwxrwx 1 root root 0 mai 6 09:33 gpiochip341 -> ../../devices/platform/INT33FF:01/gpio/gpiochip341 lrwxrwxrwx 1 root root 0 mai 6 09:33 gpiochip414 -> ../../devices/platform/INT33FF:00/gpio/gpiochip414 --w------- 1 root root 4096 mai 6 09:33 unexport

cat /sys/class/gpio/gpio362/direction in bytcr-rt5651

cat /proc/asound/cards 0 [bytcrrt5651 ]: bytcr-rt5651 - bytcr-rt5651 Hampoo-Hi10plustablet-Hampoo_reserve-CherryTrailCR cat /proc/asound/modules 0 snd_soc_sst_bytcr_rt5651 jpm@Chwui:~$ ls -al /proc/asound total 0 dr-xr-xr-x 5 root root 0 mai 14 16:37 . dr-xr-xr-x 247 root root 0 mai 14 16:36 .. lrwxrwxrwx 1 root root 5 mai 14 17:20 bytcrrt5651 -> card0 dr-xr-xr-x 5 root root 0 mai 14 17:20 card0 -r--r--r-- 1 root root 0 mai 14 17:20 cards -r--r--r-- 1 root root 0 mai 14 17:20 devices -r--r--r-- 1 root root 0 mai 14 17:20 modules dr-xr-xr-x 2 root root 0 mai 14 17:20 oss -r--r--r-- 1 root root 0 mai 14 17:20 pcm dr-xr-xr-x 2 root root 0 mai 14 17:20 seq -r--r--r-- 1 root root 0 mai 14 17:20 timers -r--r--r-- 1 root root 0 mai 14 17:20 version Any help regarding investigation direction will be appreciated.Thank you for reading.

masuyamakurai commented 6 years ago

i managed to make sound working on my hi10 plus,just follow the guide from reference issue above im using manjaro & kernel 4.14 if it relevant, i didnt managed to make it work on ubuntu though.

gsantner commented 6 years ago

@masuyamakurai kernel? distro?

masuyamakurai commented 6 years ago

Edited my reply with distro n kernel

gsantner commented 6 years ago

did you try it with 4.16 too? got display issues after random time on it

masuyamakurai commented 6 years ago

I only test 4.16 for a short period so cant comment on that, Past 4.14 i cannot make bluetooth working so i stick with 4.14 for now

Carsuzan commented 6 years ago

Any help on my issue ? Thank a lot.

masuyamakurai commented 6 years ago

Im just following this guide for my hi10 plus. https://github.com/danielotero/linux-on-hi10/issues/8#issuecomment-381542364 If you have no device you should disable snd_hdmi_lpe_audio. But once again,if you use ubuntu i cannot help you

Carsuzan commented 6 years ago

I followed same guide and disabled snd_hdmi_lpe_audio too but unfortunately still have only dummy sound device.

gsantner commented 6 years ago

@Carsuzan same here: (copied post below)

Tried to get it working too, but no success. I'm having a Chuwi Hi 10 Plus.

I tried with both 4.14 and 4.16 manjaro kernel on my device + spken started + UCM byctr_5651 installed (/usr/..). lpe audio is disabled.

Sadly does not work at all, I still just see "dummy output" and no sign of audio working or selectable :/

Kernel 4.16. Can it be that 10Plus don't have audio hardware kill switch? I cannot see any spken for example. Thats what i have at /sys/class/gpio:

drwxr-xr-x 54 root root    0 16. Mai 16:49 ..
lrwxrwxrwx  1 root root    0 16. Mai 16:49 gpiochip414 -> ../../devices/platform/INT33FF:00/gpio/gpiochip414
lrwxrwxrwx  1 root root    0 16. Mai 16:49 gpiochip341 -> ../../devices/platform/INT33FF:01/gpio/gpiochip341
lrwxrwxrwx  1 root root    0 16. Mai 16:49 gpiochip314 -> ../../devices/platform/INT33FF:02/gpio/gpiochip314
lrwxrwxrwx  1 root root    0 16. Mai 16:49 gpiochip228 -> ../../devices/platform/INT33FF:03/gpio/gpiochip228
drwxr-xr-x  2 root root    0 16. Mai 16:49 .
lrwxrwxrwx  1 root root    0 16. Mai 16:49 gpio368 -> ../../devices/platform/INT33FF:01/gpiochip1/gpio/gpio368
lrwxrwxrwx  1 root root    0 16. Mai 16:51 gpiochip225 -> ../../devices/platform/INT0002:00/gpio/gpiochip225
--w-------  1 root root 4096 16. Mai 16:51 export
--w-------  1 root root 4096 16. Mai 16:51 unexport
gpiochip4: GPIOs 225-227, parent: platform/INT0002:00, INT0002 Virtual GPIO:
 gpio-227 (                    |ACPI:Event          ) in  lo IRQ

gpiochip3: GPIOs 228-313, parent: platform/INT33FF:03, INT33FF:03:
 gpio-309 (                    |80860F14:03         ) in  lo IRQ

gpiochip2: GPIOs 314-340, parent: platform/INT33FF:02, INT33FF:02:
 gpio-322 (                    |power               ) in  hi IRQ
 gpio-336 (                    |ACPI:Event          ) in  hi IRQ

gpiochip1: GPIOs 341-413, parent: platform/INT33FF:01, INT33FF:01:
 gpio-344 (                    |ACPI:Event          ) in  hi IRQ
 gpio-364 (                    |ACPI:OpRegion       ) out hi    
 gpio-368 (                    |sysfs               ) out hi    

gpiochip0: GPIOs 414-511, parent: platform/INT33FF:00, INT33FF:00:
 gpio-492 (                    |volume_up           ) in  hi IRQ
 gpio-494 (                    |volume_down         ) in  hi IRQ

Has somebody an idea?

Carsuzan commented 6 years ago

Dummy issue solved. Have a look at https://github.com/plbossart/UCM/issues/33

masuyamakurai commented 6 years ago

Ahhh sorry i forgot about that one, Glad it worked for you

Danct12 commented 6 years ago

Alright guys, after upgrading to kernel 4.19,

Anything that your microphone (on the tablet) can hear will be played in loudspeakers (and no turning off the microphone in the settings will not help). I had to plug in a headphone and switch the output to it in order for it to stop. Is there anyway to fix it? It's happening in previous kernel versions.

More details on this, I'm using plbossart's UCM.

danielotero commented 5 years ago

I just reinstalled Arch from scratch and sound works out of the box: speakers, headphones, jack detection, microphone... Amazing progress!

Closing the issue to try to keep the repo tidy.

Danct12 commented 5 years ago

Amazing! It's the power of open source software! :+1:

Carsuzan commented 5 years ago

Hi Daniel

I have just installed archlinux 5.0.10-arch1-1-ARCH on my HI 10 plus with plasma but i can't get any sound "no output device available" neither touch screen. Could you please share your installation tips ? Thank's a lot

danielotero commented 5 years ago

I didn't do anything special. It just worked out of the box. Probably the Hi10 Plus has a different board that isn't fixed yet.

My kernel messages just outputs the following on boot:

[   13.415770] bytcr_rt5651 bytcr_rt5651: quirk IN2_MAP enabled
[   13.415776] bytcr_rt5651 bytcr_rt5651: quirk realtek,jack-detect-source 1
[   13.415779] bytcr_rt5651 bytcr_rt5651: quirk realtek,over-current-threshold-microamp 2000
[   13.415782] bytcr_rt5651 bytcr_rt5651: quirk realtek,over-current-scale-factor 1
[   13.415785] bytcr_rt5651 bytcr_rt5651: quirk MCLK_EN enabled
[   13.424545] bytcr_rt5651 bytcr_rt5651: snd-soc-dummy-dai <-> media-cpu-dai mapping ok
[   13.424631] bytcr_rt5651 bytcr_rt5651: snd-soc-dummy-dai <-> deepbuffer-cpu-dai mapping ok
[   13.434488] bytcr_rt5651 bytcr_rt5651: rt5651-aif1 <-> ssp2-port mapping ok
[   13.453527] input: bytcr-rt5651 Headset as /devices/pci0000:00/808622A8:00/bytcr_rt5651/sound/card0/input11
Carsuzan commented 5 years ago

Thank you Daniel for your quick reply. Worked also for me after a while but I didn't why. By the way i've installed Arch on the Sdcard en booted thru EFI via mmcblk0p12 android partition. File system is time to time locked to read only because I got Sdcard errors....