Microphone not working

Questions about hardware, drivers and peripherals
Forum rules
Before you post read how to get help. Topics in this forum are automatically closed 6 months after creation.
jalmeida
Level 1
Level 1
Posts: 23
Joined: Fri Mar 19, 2021 2:38 pm

Re: Microphone not working/

Post by jalmeida »

Thanks MrEen

It's fine, tomorrow is another day.

Code: Select all

Mymaga:~$ ls -l /usr/share/alsa/ucm2/chtrt5645
total 32
lrwxrwxrwx 1 root root   20 mar 16 07:46 ASUSTeKCOMPUTERINC.-T100HAN-1.0-T100HAN.conf -> chtrt5645-dmic1.conf
-rw-r--r-- 1 root root  105 fev 19  2020 chtrt5645.conf
-rw-r--r-- 1 root root  111 fev 19  2020 chtrt5645-dmic1.conf
-rw-r--r-- 1 root root  111 fev 19  2020 chtrt5645-dmic2.conf
-rw-r--r-- 1 root root  129 fev 19  2020 chtrt5645-mono-speaker-analog-mic.conf
lrwxrwxrwx 1 root root   38 mar 16 07:46 gpd-win-pocket-rt5645.conf -> chtrt5645-mono-speaker-analog-mic.conf
-rw-r--r-- 1 root root 1740 fev 19  2020 HiFi.conf
-rw-r--r-- 1 root root 2111 fev 19  2020 HiFi-dmic1.conf
-rw-r--r-- 1 root root 2188 fev 19  2020 HiFi-dmic2.conf
-rw-r--r-- 1 root root 1997 fev 19  2020 HiFi-mono-speaker-analog-mic.conf
lrwxrwxrwx 1 root root   20 mar 16 07:46 LENOVO-80XF-LenovoMIIX320_10ICR-LNVNB161216.conf -> chtrt5645-dmic2.conf
lrwxrwxrwx 1 root root   38 mar 16 07:46 TECLAST-X80Pro-Defaultstring-CherryTrailCR.conf -> chtrt5645-mono-speaker-analog-mic.conf
Mymaga:~$
Last edited by karlchen on Sun Mar 28, 2021 6:22 am, edited 1 time in total.
Reason: applied [code] [/code] tags around terminal command and terminal command output in order to improve readability
jalmeida
Level 1
Level 1
Posts: 23
Joined: Fri Mar 19, 2021 2:38 pm

Re: Microphone not working/

Post by jalmeida »

MrEen,
I don't know what to look for!

Code: Select all

Mymaga:~$ cat  /usr/share/alsa/ucm2/chtrt5645/HiFi.conf 
SectionVerb {
	# ALSA PCM
	Value {
		TQ "HiFi"
	}

	EnableSequence [
		<platforms/bytcr/PlatformEnableSeq.conf>
		<codecs/rt5645/EnableSeq.conf>

		cset "name='Stereo1 ADC1 Mux' 1"
		cset "name='I2S2 Func Switch' on"
		# 3/12 the headphone mic tends to be quite loud
		cset "name='IN1 Boost' 3"
		# 8/8 the internal analog mic tends to be quite soft
		cset "name='IN2 Boost' 8"
	]

	DisableSequence [
		<codecs/rt5645/DisableSeq.conf>
	]
}

SectionDevice."Speaker" {
	Comment "Speaker"

	Value {
		PlaybackPriority 100
		PlaybackPCM "hw:${CardId}"
	}

	ConflictingDevice [
		"Headphones"
	]

	EnableSequence [
		<codecs/rt5645/SpeakerEnableSeq.conf>
	]

	DisableSequence [
		cset "name='Ext Spk Switch' off"
		cset "name='Speaker Channel Switch' off"
	]
}

SectionDevice."Headphones" {
	Comment "Headphones"

	Value {
		PlaybackPriority 200
		PlaybackPCM "hw:${CardId}"
		JackControl "Headphone Jack"
		JackHWMute "Speaker"
	}

	ConflictingDevice [
		"Speaker"
	]

	EnableSequence [
		<codecs/rt5645/HeadphonesEnableSeq.conf>
	]

	DisableSequence [
		cset "name='Headphone Switch' off"
		cset "name='Headphone Channel Switch' off"
	]
}

<codecs/rt5645/AnalogMic.conf>

SectionDevice."Headset" {
	Comment "Headset Microphone"

	Value {
		CapturePriority 200
		CapturePCM "hw:${CardId}"
		JackControl "Headset Mic Jack"
		JackHWMute "Mic"
	}

	EnableSequence [
		<codecs/rt5645/HSMicEnableSeq.conf>

		cset "name='Sto1 ADC MIXL ADC2 Switch' off"
		cset "name='Sto1 ADC MIXR ADC2 Switch' off"

		cset "name='Mono ADC MIXL ADC1 Switch' on"
		cset "name='Mono ADC MIXR ADC1 Switch' on"
		cset "name='Mono ADC MIXL ADC2 Switch' off"
		cset "name='Mono ADC MIXR ADC2 Switch' off"
	]

	DisableSequence [
		<codecs/rt5645/HSMicDisableSeq.conf>
	]
}
@Mymaga:~$
Last edited by karlchen on Sun Mar 28, 2021 6:22 am, edited 1 time in total.
Reason: applied [code] [/code] tags around terminal command and terminal command output in order to improve readability
User avatar
MrEen
Level 23
Level 23
Posts: 18343
Joined: Mon Jun 12, 2017 8:39 pm

Re: Microphone not working/

Post by MrEen »

I'm afraid what I was hoping to try isn't going to work here. They did quite a big change to the subsystem from pre 5.3 kernel to the present. If that folder had only two files, we could have tried overwriting them, but they've split everything apart now, and I just have no idea where to look to solve this.

Two more things I'd like to look at in case it helps at all:

Code: Select all

wget http://www.alsa-project.org/alsa-info.sh -O alsa-info.sh && bash alsa-info.sh

Code: Select all

sudo dmesg | grep -C1 -E 'ALSA|HDA|sof|HDMI|snd[_-]|sound|hda.codec|hda.intel'
The first will ask if you want to save locally or upload. Please choose upload, then paste the URL it'll give you along with the second one's output.
jalmeida
Level 1
Level 1
Posts: 23
Joined: Fri Mar 19, 2021 2:38 pm

Re: Microphone not working/

Post by jalmeida »

Thanks MrEen


Your ALSA information is located at http://alsa-project.org/db/?f=0ed4552e7 ... 89d0ae5a38
Please inform the person helping you.

Code: Select all

root@Mymaga:/home/me# sudo dmesg | grep -C1 -E 'ALSA|HDA|sof|HDMI|snd[_-]|sound|hda.codec|hda.intel'
[    0.387596] ACPI: Added _OSI(Linux-Dell-Video)
[    0.387604] ACPI: Added _OSI(Linux-Lenovo-NV-HDMI-Audio)
[    0.387612] ACPI: Added _OSI(Linux-HPI-Hybrid-Graphics)
--
[    4.798366] integrity: Loading X.509 certificate: UEFI:db
[    4.798466] integrity: Loaded X.509 cert 'Microsoft Windows Production PCA 2011: a92902398e16c49778cd90f99e4f9ae17c55af53'
[    4.798469] integrity: Loading X.509 certificate: UEFI:db
[    4.798542] integrity: Loaded X.509 cert 'Microsoft Corporation UEFI CA 2011: 13adbf4309bd82709c8cd54f316ed522988a1bd4'
[    4.798544] integrity: Loading X.509 certificate: UEFI:db
--
[    8.478814] raid6: using ssse3x2 recovery algorithm
[    8.482157] xor: measuring software checksum speed
[    8.518738]    prefetch64-sse:  6655.000 MB/sec
--
[   12.946496] WARNING: CPU: 3 PID: 373 at drivers/media/mc/mc-entity.c:669 media_create_pad_link+0x184/0x1b0 [mc]
[   12.946498] Modules linked in: uvcvideo(+) videobuf2_vmalloc videobuf2_memops snd_soc_rt5645(+) videobuf2_v4l2 axp288_charger extcon_axp288(+) snd_intel_sst_acpi snd_intel_sst_core axp288_fuel_gauge(+) snd_soc_sst_atom_hifi2_platform snd_soc_rl6231 snd_soc_acpi_intel_match snd_soc_acpi nls_iso8859_1 videobuf2_common axp288_adc joydev videodev snd_soc_core input_leds snd_compress industrialio ac97_bus mc snd_pcm_dmaengine axp20x_pek btsdio brcmfmac snd_pcm snd_seq_midi brcmutil snd_seq_midi_event cfg80211 snd_rawmidi mei_txe intel_xhci_usb_role_switch roles mei processor_thermal_device intel_rapl_common int340x_thermal_zone intel_soc_dts_iosf hci_uart snd_seq btqca btrtl btbcm btintel bluetooth snd_seq_device snd_timer ecdh_generic ecc snd soundcore 8250_dw acpi_pad mac_hid int3400_thermal soc_button_array acpi_thermal_rel intel_int0002_vgpio sch_fq_codel parport_pc ppdev lp parport ip_tables x_tables autofs4 btrfs blake2b_generic xor raid6_pq libcrc32c dm_mirror dm_region_hash dm_log
[   12.946560]  hid_generic usbhid hid i915 mmc_block i2c_algo_bit crct10dif_pclmul drm_kms_helper crc32_pclmul ghash_clmulni_intel aesni_intel crypto_simd syscopyarea cryptd sysfillrect sysimgblt glue_helper fb_sys_fops cec rc_core drm xhci_pci spi_pxa2xx_platform lpc_ich xhci_pci_renesas video axp20x_i2c axp20x dw_dmac dw_dmac_core sdhci_acpi sdhci
--
[   15.165961] NET: Registered protocol family 38
[   15.414599] cht-bsw-rt5645 cht-bsw-rt5645: snd-soc-dummy-dai <-> media-cpu-dai mapping ok
[   15.419146] cht-bsw-rt5645 cht-bsw-rt5645: snd-soc-dummy-dai <-> deepbuffer-cpu-dai mapping ok
[   15.419704] cht-bsw-rt5645 cht-bsw-rt5645: rt5645-aif1 <-> ssp2-port mapping ok
[   15.484076] input: chtrt5645 Headset as /devices/pci0000:00/808622A8:00/cht-bsw-rt5645/sound/card0/input10
[   18.388415] intel_sst_acpi 808622A8:00: FW Version 01.0b.02.02
root@Mymaga:/home/me#
Last edited by karlchen on Sun Mar 28, 2021 6:22 am, edited 1 time in total.
Reason: applied [code] [/code] tags around terminal command and terminal command output in order to improve readability
jalmeida
Level 1
Level 1
Posts: 23
Joined: Fri Mar 19, 2021 2:38 pm

Re: Microphone not working/

Post by jalmeida »

MrEen,

Should I install a previous version of Mint ? Another Kernel?
User avatar
MrEen
Level 23
Level 23
Posts: 18343
Joined: Mon Jun 12, 2017 8:39 pm

Re: Microphone not working/

Post by MrEen »

The one thing that might work is to install Mint 19.2, then run the commands in this post.

I'm afraid I cannot guarantee this will work, but it was the solution to this issue before the 5.3 kernel was available. Mint 19.2 comes with a (supported) 4.15 kernel, so I have some hope this will work.
jalmeida
Level 1
Level 1
Posts: 23
Joined: Fri Mar 19, 2021 2:38 pm

Re: Microphone not working/

Post by jalmeida »

Thanks MrEen

OK I'll give it a try.
jalmeida
Level 1
Level 1
Posts: 23
Joined: Fri Mar 19, 2021 2:38 pm

Re: Microphone not working

Post by jalmeida »

MrKeen,

After install I have no input or output sound.

Executing your command, it returns the error:

root@Mymaga:/home/# apt install git
A ler as listas de pacotes... Pronto
A construir árvore de dependências
A ler a informação de estado... Pronto
git is already the newest version (1:2.17.1-1ubuntu0.8).
0 pacotes actualizados, 0 pacotes novos instalados, 0 a remover e 546 não actualizados.
2 pacotes não totalmente instalados ou removidos.
Após esta operação, serão utilizados 0 B adicionais de espaço em disco.
Deseja continuar? [S/n] s
A instalar grub-efi-amd64-signed (1.93.14+2.02-2ubuntu8.13) ...
Installing for x86_64-efi platform.
Could not prepare Boot variable: No space left on device
grub-install: error: efibootmgr failed to register the boot entry: Input/output error.
dpkg: erro ao processar o pacote grub-efi-amd64-signed (--configure):
installed grub-efi-amd64-signed package post-installation script subprocess returned error exit status 1
dpkg: problemas com dependências impedem a configuração de shim-signed:
shim-signed depende de grub-efi-amd64-signed; no entanto:
O pacote grub-efi-amd64-signed ainda não está configurado.

dpkg: erro ao processar o pacote shim-signed (--configure):
problemas com dependências - a deixar por configurar
Foram encontrados erros enquanto processava:
grub-efi-amd64-signed
shim-signed
E: Sub-process /usr/bin/dpkg returned an error code (1)
root@Mymaga:/home/#
root@Mymaga:/home/# df -H
Filesystem Size Used Avail Use% Mounted on
udev 974M 0 974M 0% /dev
tmpfs 202M 2,0M 200M 1% /run
/dev/mmcblk0p2 31G 7,6G 21G 27% /
tmpfs 1,1G 29M 978M 3% /dev/shm
tmpfs 5,3M 4,1k 5,3M 1% /run/lock
tmpfs 1,1G 0 1,1G 0% /sys/fs/cgroup
/dev/mmcblk0p1 536M 11M 526M 2% /boot/efi
tmpfs 202M 54k 202M 1% /run/user/1000
tmpfs 202M 0 202M 0% /run/user/0
root@Mymaga:/home/#

root@Mymaga:~#
root@Mymaga:~# git clone https://github.com/plbossart/UCM.git
Cloning into 'UCM'...
remote: Enumerating objects: 365, done.
remote: Total 365 (delta 0), reused 0 (delta 0), pack-reused 365
Receiving objects: 100% (365/365), 80.18 KiB | 812.00 KiB/s, done.
Resolving deltas: 100% (160/160), done.
root@Mymaga:~# sudo cp -rf ~/UCM/bytcr-rt5645 /usr/share/alsa/ucm
cp: cannot stat '/root/UCM/bytcr-rt5645': No such file or directory
root@Mymaga:~# ls
Desktop UCM
root@Mymaga:~# cd UCM/
root@Mymaga:~/UCM# ls
bytcht-da7213 bytcr-rt5651 chtmax98090 sof-bdw-rt5677 sof-bytcr-rt5640 sof-chtrt5645
bytcht-nocodec byt-max98090 chtnau8824 sof-bxtda7219max sof-bytcr-rt5651
bytcht-pcm512x byt-rt5640 chtrt5645 sof-bxt-pcm512x sof-cht-bsw-rt5672
bytcr-rt5640 cht-bsw-rt5672 skl_hda_card sof-bytcht-da7213 sof-chtmax98090
root@Mymaga:~/UCM#

What directory should I copy ?
User avatar
MrEen
Level 23
Level 23
Posts: 18343
Joined: Mon Jun 12, 2017 8:39 pm

Re: Microphone not working

Post by MrEen »

You ran the steps from a root terminal. Try again from a normal user terminal.
jalmeida
Level 1
Level 1
Posts: 23
Joined: Fri Mar 19, 2021 2:38 pm

Re: Microphone not working

Post by jalmeida »

MrKeen,

The directory bytcr-rt5645 doesn't exist.
What directory should I copy ?

Best regards
User avatar
MrEen
Level 23
Level 23
Posts: 18343
Joined: Mon Jun 12, 2017 8:39 pm

Re: Microphone not working

Post by MrEen »

Ahh, it seems to have been removed. Let's see this one again please:

Code: Select all

wget http://www.alsa-project.org/alsa-info.sh -O alsa-info.sh && bash alsa-info.sh
There are a couple of similar options and I want to make sure we get the correct one.
jalmeida
Level 1
Level 1
Posts: 23
Joined: Fri Mar 19, 2021 2:38 pm

Re: Microphone not working

Post by jalmeida »

Thanks MrEen.

Your ALSA information is located at http://alsa-project.org/db/?f=73bc713e2 ... 0340da04b1
Please inform the person helping you.
User avatar
MrEen
Level 23
Level 23
Posts: 18343
Joined: Mon Jun 12, 2017 8:39 pm

Re: Microphone not working

Post by MrEen »

Damn, they have a cht-bsw-rt5672 which is the right letters but the wrong numbers, and a chtrt5645 which is the opposite.

Give the second one a try. It should be extremely similar to what you need anyway, and if it doesn't help, it at least shouldn't hurt at all.
jalmeida
Level 1
Level 1
Posts: 23
Joined: Fri Mar 19, 2021 2:38 pm

Re: Microphone not working

Post by jalmeida »

Thanks MrEen

Here's the output, but still no sound.

Mymaga:~$ sudo cp -rf ~/UCM/chtrt5645 /usr/share/alsa/ucm

Mymaga:~$ sudo alsa force-reload
Unloading ALSA sound driver modules: snd-soc-sst-cht-bsw-rt5645 snd-intel-sst-acpi snd-intel-sst-core snd-soc-sst-atom-hifi2-platform snd-soc-acpi snd-soc-acpi-intel-match snd-soc-rt5645 snd-soc-rl6231 snd-soc-core snd-compress snd-pcm-dmaengine snd-seq-midi snd-hdmi-lpe-audio snd-seq-midi-event snd-pcm snd-rawmidi snd-seq snd-seq-device snd-timer (failed: modules still loaded: snd-intel-sst-acpi snd-intel-sst-core snd-soc-sst-atom-hifi2-platform snd-soc-acpi snd-soc-acpi-intel-match snd-soc-core snd-compress snd-pcm-dmaengine snd-pcm snd-timer).
Loading ALSA sound driver modules: snd-soc-sst-cht-bsw-rt5645 snd-intel-sst-acpi snd-intel-sst-core snd-soc-sst-atom-hifi2-platform snd-soc-acpi snd-soc-acpi-intel-match snd-soc-rt5645 snd-soc-rl6231 snd-soc-core snd-compress snd-pcm-dmaengine snd-seq-midi snd-hdmi-lpe-audio snd-seq-midi-event snd-pcm snd-rawmidi snd-seq snd-seq-device snd-timer.
Mymaga:~$
User avatar
MrEen
Level 23
Level 23
Posts: 18343
Joined: Mon Jun 12, 2017 8:39 pm

Re: Microphone not working

Post by MrEen »

Let's see if anything has changed:

Code: Select all

bash alsa-info.sh
That should be good enough instead of the full line above.
jalmeida
Level 1
Level 1
Posts: 23
Joined: Fri Mar 19, 2021 2:38 pm

Re: Microphone not working

Post by jalmeida »

MrEen

I Installed Mint 20.1-Mate
and bought a USB Bluetooth dongle and a Bluetooth headset , the problem (for now) is solved.

In a future update, probably this INTEL chip will begin to work.

Thanks for your precious help.
User avatar
MrEen
Level 23
Level 23
Posts: 18343
Joined: Mon Jun 12, 2017 8:39 pm

Re: Microphone not working

Post by MrEen »

I believe it will eventually. The 5.3 kernel was supposed to fix this, and did for many. I can't figure out why some are still having the same issue, and now the old solution isn't even working for most.

If/when the urge strikes you, make a Live USB of Ubuntu 20.10 and see if the mic works there. If so, you can safely(ish) assume it will work when Mint 21 comes out next year.
Locked

Return to “Hardware Support”