alsa-project / alsa-ucm-conf

ALSA Use Case Manager configuration
BSD 3-Clause "New" or "Revised" License
74 stars 214 forks source link

bytcr-rt5640 initiializes but has wrong settings #96

Closed AnterCreeper closed 3 years ago

AnterCreeper commented 3 years ago

My device is Elitepad 1000 G2. The headphone and the mic inside cannot work. However, The speaker works properly. The mic IN1 is the headphone mic insted of the mic inside. I think that it may be because the audio was ported to the wrong place. Sorry for my bad English :D

AnterCreeper commented 3 years ago

It looks like this one : https://github.com/plbossart/UCM/issues/1

libinyang commented 3 years ago

@AnterCreeper With the solution mentioned in plbossart/UCM#1, does your platform work now?

perexg commented 3 years ago

Please, show output (URL only) from alsa-info.sh.

AnterCreeper commented 3 years ago

kernel : 5.8.0-55-generic, ubuntu 20.04.2 LTS First, I tried the alsa-info.sh, here is http://alsa-project.org/db/?f=dddafe46197468ad0b8bf51025962307758cbe03

AnterCreeper commented 3 years ago

Besides, Let me show you something I found. Maybe it is caused by the incorrect quirk of the snd-soc-sst-bytcr-rt5640.

I found the commit: https://github.com/torvalds/linux/commit/55fc205600ff3b529631cfe03b58645e3844bd92#diff-c17e112b5db46deaa4c89b4acfe20aebf7f6d0cdc7c55c6266ac70a834bba99b

The platform is atom Z3795. I kept trying different snd-soc-sst-bytcr-rt5640.quirk. with 0x405420, just BYT_RT5640_DMIC1_MAP BYT_RT5640_JD_SRC_JD1_IN4P BYT_RT5640_OVCD_TH_2000UA BYT_RT5640_OVCD_SF_0P75 I can sometimes hear strange noise from the headphone, such as during the startup, or opening the pavucontrol.

AnterCreeper commented 3 years ago

@libinyang No. This device is too strange. I suffer some other problems, too. Besides, due to the lack of Intel eMMC controller driver, I even cannot install Windows.

AnterCreeper commented 3 years ago

Some other information: HP Elitepad 1000 g2 has two digital microphones(stereo), two speakers(stereo) and a jack.

AnterCreeper commented 3 years ago

DSDT.zip the DSDT.dsl File

AnterCreeper commented 3 years ago

https://github.com/torvalds/linux/blob/master/Documentation/devicetree/bindings/sound/rt5640.txt

AnterCreeper commented 3 years ago

I will close it because it's a bug.

AnterCreeper commented 3 years ago

The Elitepad 1000 G2 uses rt5642, no the rt5640.

AnterCreeper commented 3 years ago

I find this by tearing down the device.

AnterCreeper commented 3 years ago

However, I didn't know if some Elitepad 1000 G2 will use rt5640. It should be check.

AnterCreeper commented 3 years ago

Is this bug https://bugzilla.kernel.org/show_bug.cgi?id=86581 not fixed? @libinyang @perexg

libinyang commented 3 years ago

From the alsa-info, the driver seems to be OK.

AnterCreeper commented 3 years ago

From the alsa-info, the driver seems to be OK.

Here is further information: @libinyang @perexg https://bugzilla.kernel.org/show_bug.cgi?id=213415

我试了太多次了,基本啥也没用。我观察到的现象太离奇了。 By trail and error, no quirk works. And some phenomena are so strange. For example,

  1. DMIC1, IN1 are ported to the jack mic wire.(if the quirk is 0x403f20, I can hear a lot of noise from the headphone if I monitor the dmic, and if I plugged off both the dmic, the noise disappeared. ) 设置成0x403f20时,当我监听内置麦克风时居然能从耳机接收到了MEMS麦克风的信号(因为把两个mic都拔掉以后噪音就消失了),用万用表测电压太低了,测不出信号频率。

  2. DMIC2 can't work, the input audio device in alsa are all missing.

  3. from IN1 we can get the jack input audio. Just like Hans de Goede said: As for the jack / headsetmic giving some sound on IN1, this likely is cross-talk since sofar on all known devices it is always connected to IN2, if you disable jackdetect by setting the jackdetect nibble to 0, e.g. use 0x403400 as quirk and then select the headsetmic by running:

alsaucm -c bytcr-rt5640 set _verb HiFi set _enadev Headset

Which will activate the IN2 input then I expect that you will get (better) sound there. Note it is possible that the jack-input is actually connected to IN1, but that would be a first (and we would need to extend the input mapping code in sound/soc/intel/boards/bytcr_rt5640.c to deal with this).

The device is just like a black box. What we exactly know only is that this device uses MEMS dual-microphone.

For more information, we should ask the Hewlett-Packard. Or the best method is to decompile the driver for windows.我觉得最好的方法是 要么找惠普,得到这些关键信息,要么把设备拆了,从电路层面根据datasheet分析声卡接线情况,要么反编译Windows驱动,因为设置被写到程序里了。

AnterCreeper commented 3 years ago

@libinyang I think the reason is not the driver, but how the ALC5642 connected with other things. So, HP certainly knows about it.