Bug 96691
Summary: | Audio not working on Lenovo Thinkpad Tablet 10 (Baytrail) | ||
---|---|---|---|
Product: | Drivers | Reporter: | Sebastien Bourdeauducq (sb) |
Component: | Sound(ALSA) | Assignee: | Jaroslav Kysela (perex) |
Status: | NEW --- | ||
Severity: | normal | CC: | 5152, bardliao, bugzilla, cbm, freemancrowbar100500, miha.rylov, olivextra-web, pierre-louis.bossart, russianneuromancer, sassmann, st.dooh, tiwai, tsunghanliu, v.dev, yang.jie, youling257 |
Priority: | P1 | ||
Hardware: | All | ||
OS: | Linux | ||
Kernel Version: | 4.0 | Subsystem: | |
Regression: | No | Bisected commit-id: | |
Attachments: |
DSDT
dmesg dmidecode dmesg with kernel 4.8.12 dmesg dmesg output Pierre's branch quirk for Lenovo Tablet 10 dmesg after applied quirk patch dmidecode (yet another) rt5670 mixer settings dmidecode (lenovo miix 2 10) dmesg (kernel 4.11-rc5, lenovo miix 2 10) ucm config attachment-10370-0.html speaker + headphone registers (lenovo miix 2 10) registers (Dell 5855) attachment-15085-0.html fix for 4.13 machine driver selection fix for 4.13+ machine driver selection |
Description
Sebastien Bourdeauducq
2015-04-15 12:13:23 UTC
if this still relevant, we have ways to fix this using the same quirks as for Surface Please provide DSDT and output of /sys/bus/acpi/devices/10EC*/status Created attachment 246311 [details]
DSDT
$ cat /sys/bus/acpi/devices/10EC5640\:00/status 15 I have also tried to hack a driver together: https://gist.github.com/sbourdeauducq/8c5da8ac0da13e21ee31 which produce some sound in the built-in speakers sometimes, but only uncontrolled beeps and screeches. Can you use the latest kernel and provide the dmesg output? that would tell us if the codec is not physically a rt5640 but a rt5670 one And your machine driver can't work as is, baytrail uses a 25MHZ Mclk, not 19.2 as for Cherrytrail so the whole PLL reference is just wrong. if indeed it is a rt5670 we can fix this fairly easily with the clock patches I generated for bytcr_rt5640 Created attachment 246321 [details]
dmesg
ok, so it's definitely a BIOS issue based on the result: [ 4.368444] rt5640 i2c-10EC5640:00: Device with ID register 0x6271 is not rt5640/39 [ 4.378007] FUJITSU Extended Socket Network Device Driver - version 1.1 - Copyright (c) 2015 FUJITSU LIMITED [ 4.383115] ACPI: Battery Slot [BAT0] (battery absent) [ 4.386322] rt5645 i2c-10EC5640:00: Device with ID register 0x6271 is not rt5645 or rt5650 Adding Bard Liao from Realtek to confirm which device 0x6271 really is. There may be a second issue since it looks like rt5640 is also aliased to rt5645/50 0x6271 is rt5670/rt5672 codec. Please use rt5670 codec driver with 10EC5670 ACPI id. so the simple answer is to add a quirk just like for Surface3. We would need the output of dmidecode to create this quirk. see http://lxr.free-electrons.com/source/sound/soc/intel/atom/sst/sst_acpi.c#L329 if you want to test this yourself. However if your platform is a BYT-CR so the cht_bsw_rt5672 machine driver would need to get the same changes as bytcr_rt5640 to enable SSP0-AIF2 routing. Can you please test with the latest mainline kernel and let me know if you see anything with "Baytrail-CR" in dmesg. the dsdt looks fairly old so we might be lucky that this is the older package with SSP2 enabled. Created attachment 246711 [details]
dmidecode
Created attachment 246721 [details]
dmesg with kernel 4.8.12
Doesn't contain Baytrail-CR
I hacked sound/soc/intel/atom/sst/sst_acpi.c to use cht-bsw-rt5672 at all times, but some other code (maybe sound/soc/intel/common/sst-acpi.c?) still loads byt-rt5640 stuff, with messy results. What else do I need to change? you need to enable the BYTCR_RT5640 config which is mutually exclusive with BYT_RT5640 (marked as deprecated and shouldn't be used). if byt-rt5640 is loaded you enabled the old deprecated driver. http://lxr.free-electrons.com/source/sound/soc/intel/Kconfig#L138 Since this isn't BYT-CR the only points to implement are a quirk to use 5670 on this machine (same as with surface but 5670 instead of 5645) and add the clock management in the machine driver (same as in bytcr_rt5640). OK I'm loading the new driver and cht-bsw-rt5672 but I still see this in dmesg: [ 5.315790] rt5640 i2c-10EC5640:00: Device with ID register 0x6271 is not rt5640/39 [ 5.348280] rt5645 i2c-10EC5640:00: Device with ID register 0x6271 is not rt5645 or rt5650 I have little clue about how this Intel sound system works... See what was done for surface, they use 10EC5640 to load the 565645 driver. http://lxr.free-electrons.com/source/sound/soc/codecs/rt5645.c#L3544 Here you need to do the same to load the 5670 driver. Then in set_acpi you need to hack a quirk to use cht-bsw-rt5672 when you see a combination of 10RC5640 and your DMI ID. so two hacks to load the right codec driver and the right machine driver. You may want to disable the bytcr_rt5640 and rt5640 drivers in a first step to avoid conflicts (if any) Can you try this branch https://github.com/plbossart/sound/commits/experimental/codecs compile tested only, it will load the rt5670 driver and overloads the machine driver to use cht_bsw_rt5672 I am not sure about the PRODUCT_NAME reported by dmidecode, you may have to debug this part Created attachment 247351 [details]
dmesg
The DMI match works as expected, but the kernel persists in loading rt5640 stuff in addition to the cht-bsw-rt5672 driver (same problem I had when I tried). Full dmesg attached.
Note that I simply patched stock 4.8.12 with your last two TPT10-related commits to avoid recompiling a whole kernel - are there others patches I should get? And snd_soc_rt5670 does get loaded eventually. The fact that snd-soc-rt5640 gets loaded is no problem. It's just because the device gives the bogus ID (10EC5640) and the kernel tries to bind multiple drivers that support this ID one by one until it's properly bound. The only question is whether rt5670 gets loaded and bound. In your case, rt5670 is loaded but doesn't seem bound. Check /sys/kernel/debug/asoc/* to see whether the codec was registered. (In reply to Sebastien Bourdeauducq from comment #18) > Note that I simply patched stock 4.8.12 with your last two TPT10-related > commits to avoid recompiling a whole kernel - are there others patches I > should get? Yes, there are a few more fixes that have been already merged in upstream Mark's tree. It'd be better to test Pierre's tree as is than cherry-picking unless you're sure about it. Here's what I have in /sys/kernel/debug/asoc: # cat codecs i2c-10EC5640:00 snd-soc-dummy # cat dais rt5670-aif2 rt5670-aif1 ssp2-port ssp1-port ssp0-port compress-cpu-dai deepbuffer-cpu-dai media-cpu-dai snd-soc-dummy-dai # cat platforms sst-mfld-platform snd-soc-dummy looks like the right codec is loaded then? is the card created? No, aplay -l says no soundcard is found. And the dmesg does contain some errors. can you share the logs please? I have already posted them: https://bugzilla.kernel.org/show_bug.cgi?id=96691#c17 Anything else you want? The dmesg shows it's 4.8.12-2-ARCH, so it's not Pierre's branch. Please try Pierre's branch as is. Otherwise we can't know whether you missed anything. do you have PINCTRL_BAYTRAIL and PINCTRL_CHERRYVIEW Kconfig options set a 'm' or 'y' ? there was a change in the GPIO that makes this required, otherwise the probe fails I have: CONFIG_PINCTRL_BAYTRAIL=y CONFIG_PINCTRL_CHERRYVIEW=y What is required, m or y? either is fine, the 'not set' is problematic Created attachment 255765 [details]
dmesg output Pierre's branch
dmesg output for Pierre's branch, as for 04-04-2017
commit 1d2c6f5162bab3755a0e2742cda4932bdc728efb
I tried to load Pierre's branch (as for today). dmesg: https://bugzilla.kernel.org/attachment.cgi?id=255765 Codec still fails to load. Is there anything I can help with? Created attachment 255767 [details]
quirk for Lenovo Tablet 10
can you try the last patch - which was tested my another user. If it doesn't work please post the output of dmidecode as an attachment, it's likely yet another skew of the same product Created attachment 255769 [details]
dmesg after applied quirk patch
Created attachment 255771 [details]
dmidecode (yet another)
Seems there is some progress. I still have no sound after patch, but picture looks different (see dmesg above). And indeed, seems in my tablet DMI_PRODUCT_NAME is different. Again, kernel is https://github.com/plbossart/sound/commits/experimental/codecs branch with this patch and Debian almost default config. What is a base for this patch? Looks like this commit is not in a tree. dmidecode output is also attached. looks like the quirk fixes the probing part and the remaining issue is to set the relevant mixers. I will post the rt5670 I had from Realtek, try to fix a UCM configuration that works from the examples on github.com/plbossart/UCM Created attachment 255773 [details]
rt5670 mixer settings
I have the same results (as above) on "Lenovo Miix 2 10" Compiled kernel is mainline 4.11-rc5 (thinkpad10 quirk merged) with changes according to my model (as suggested above): ... DMI_MATCH(DMI_SYS_VENDOR, "LENOVO"), DMI_MATCH(DMI_PRODUCT_VERSION, "Lenovo Miix 2 10"), ... Device is detected now, but sound is missing. Created attachment 255809 [details]
dmidecode (lenovo miix 2 10)
Created attachment 255811 [details]
dmesg (kernel 4.11-rc5, lenovo miix 2 10)
thanks for the update. I created a new branch with all known DMI information for Lenovo devices, can you please try it and see if there is any regression: https://github.com/plbossart/sound/tree/topic/lenovo For the Audio Port: ASoC: no backend DAIs enabled for Audio Port error, this is a problem with missing mixers. You will need to create a UCM file for this based on the examples and settings I provided earlier. I don't have this hardware so can't really help here. Thanks, i'll try to do this. Branch `topic/lenovo` works for me without visible regressions. I managed to make a partially working UCM config(below), based on provided examples. I was test it with mainline kernel(v4.11-rc5) and 'topic/lenovo', and results are following (for lenovo miix 2 10): Speakers - works in both cases; Headphones - in both cases sound has "overdrive/crackling" effect; Microphones(internal) - works with 'topic/lenovo' kernel only, and with issues; Subwoofer(on the keyboard dock) - turns on with 'topic/lenovo', but has "overdrive/crackling" effect (is there way to turn it off?); Of course, my config can be wrong, but it looks like routes for rt5670 does not very well fit to my rt5672. Created attachment 255917 [details]
ucm config
for the microphone, your config differs from the one Realtek recommended, specifically you used cset "name='Stereo1 ADC L2 Mux' DMIC" cset "name='Stereo1 ADC R2 Mux' DMIC" when they suggested: cset name="Stereo1 ADC 2 Mux" "DMIC" To disable the dock subwoofer maybe disable the line out? for the headphone, this looks similar to an issue we had w/ rt5645, maybe something to do with charge pump and setup of the headphone amp or a different quirk needed. maybe you can dump the registers during headphone playback and post them for Realtek to look at? (cat /sys/kernel/debug/asoc/10EC*/registers) - approximated command to be fixed. Yes, it differs, but amixer shows me there is no such control "Stereo1 ADC 2 Mux" and mic does not turns on with it at all. Microphone works somehow, but it periodically starts to make noise, and the recorded sound only on the left channel. Why is the soundcard name "cherrytrailcraudio"? It's not Cherry Trail, it's Bay Trail. I don't know, lenovo detects it as "cherrytrailcraudio". Ah crap, I forgot that we are still missing the 19.2MHz clock support in the driver. If you use this 'cherrytrailcraudio' machine driver on baytrail, the mclk is set to 19.2 but the actual clock is 25MHz (different oscillator than cherrytrail). I'll post an update shortly (just the same fixes as in other machine drivers). update shared on github (topic/lenovo). Compile-tested only but this should mostly do the job. Thank you. I'll try it. The microphone stopped making noise after the update, but the problem with headphones still remains. so now we have speakers+ mic working. For the headphone, the only thing that we can influence is the pdata set in the driver. if (dmi_check_system(dmi_platform_intel_braswell)) { rt5670->pdata.dmic_en = true; rt5670->pdata.dmic1_data_pin = RT5670_DMIC_DATA_IN2P; rt5670->pdata.dev_gpio = true; rt5670->pdata.jd_mode = 1; } @Bard, do you know if those last two settings make sense? jd_mode 1 looks to be the 2-port version and for other codecs we used jd_mode=3 when there was a single connector. rt5670->pdata.dev_gpio = true; makes sense. But as you said, jd_mode 1 means 2-port version. There are only a few projects use that version. Usually, jd_mode would be 2 or 3. jd_mode 2 means VDD=3.3v and jd_mode 3 means VDD=1.8v. Thanks Bard. @Andrew Y, can you try forcing jd_mode to 2 or 3 to see if this improves the platform. If yes, we'll have to break the quirks in two @Takashi, just to confirm, does the wyse device really have two ports or would this need to be changed as well? Ok, I'll do it. (In reply to Pierre Bossart from comment #58) > @Takashi, just to confirm, does the wyse device really have two ports or > would this need to be changed as well? It's using jd_mode=3 for one port like other braswell models. (In reply to Takashi Iwai from comment #60) > (In reply to Pierre Bossart from comment #58) > > @Takashi, just to confirm, does the wyse device really have two ports or > > would this need to be changed as well? > > It's using jd_mode=3 for one port like other braswell models. if I look at the code, it's using jd_mode=1 http://lxr.free-electrons.com/source/sound/soc/codecs/rt5670.c#L2822 http://lxr.free-electrons.com/source/sound/soc/codecs/rt5670.c#L2859 or there is a missing patch... Ah, sorry, I was confused. Yes, it's set up as two ports, but it has a single port. It can still detect the headset mic, so I didn't care about it at the first patch. Setting jd_mode to 2 or 3 has no effect so I back to jd_mode=1 I don't have ideas on what to do here. Maybe dump the registers (cat /sys/kernel/debug/asoc/i2c-10EC/registers or something like that) and add them as attachment for Realtek to look at? Created attachment 255991 [details] attachment-10370-0.html I am on a business trip during 4/24 ~ 4/28. Slow mail response may be expected. Please contact shumingf@realtek.com or flove@realtek.com for urgent case. Thanks. Some details that may matters. Headphone. When i turning off one of the switches, related to the playback channels (HPOVOL MIXL\R DAC1 Switch, DAC1 MIXL\R DAC1 Switch, Stereo DAC MIXL\R DACL1\R1 Switch), the sound gets louder and almost as it should be, but it's not a stereo, despite the fact it presents on two channels. When all required switches are turned on, it has "overdrive/crackling" effect. Subwoofer. I can't find any way to turn off the subwoofer. I tried to turn off the line out, but seems like any manipulations with all related controls (OUT... and LOUT...) has no effect at all. But when I connect the headphone jack - subwoofer turns off! I have a dir 'sys/kernel/debug/asoc/cherrytrailcraudio/codec:i2c-10EC5640:00/', but there is no 'registers', there is 'codec_reg' and it is empty. On Dell 5855 there is codec:i2c-10EC5672:00, but also no registers, only empty codec_reg. Check the ones in /sys/kernel/debug/regmap/* instead. Thanks, it's here. Created attachment 255993 [details]
speaker + headphone registers (lenovo miix 2 10)
Created attachment 255995 [details]
registers (Dell 5855)
Pierre, is there anything else we can provide to help get this resolved? You need to work on your config with the line out disabled when the headphone is on. I am not sure if it makes sense to have both headphone and lineout at the same time. Is there good article on UCM troubleshooting anywhere? I can't find anything useful about this topic, so I just don't know how to do this. Andrew, do you have any progress on config for your device? it's not complicated you have a common section and then a set of device-specific inits that are executed when you select them with the UI. You want to declare the devices as exclusive to make sure you don't have side effects. Just start with a file that deals only with mic/speakers, then add the headphone and last line out. It's not complicated only for people who have been working with it for months or years. For everyone else, the audio experience with those drivers is very bad. Created attachment 256849 [details] attachment-15085-0.html I am currently out of office and will return on June 8. Slow mail response may be expected. Please contact shumingf@realtek.com or flove@realtek.com for urgent case. Thanks. Well, I have to say, that Sebastien is right. > you have a common section and then a set of device-specific inits that are > executed when you select them with the UI. Yes, I understand this part. > I am not sure if it makes sense to have both headphone and lineout at the > same time. > You want to declare the devices as exclusive to make sure you don't have side > effects. How to do so in case of UCM from comment #46? > Just start with a file that deals only with mic/speakers How to limit UCM from comment #46 to only mic/speakers of Dell 5855? And with Irbis NB41 I can't get audio at all, not on headphones, not on speakers: https://bugzilla.kernel.org/show_bug.cgi?id=189261#c84 I compiled the latest kernel (4.12-rc3) with all ASoC audio drivers disabled, except RT5672, and now almost all sound is ok (speaker and headphone). Mic works, but makes some noise time to time (not well tested yet). UCM the same as I posted earlier. Kernel config: Device Drivers --> <M> Sound card support --> <M> Advanced Linux Sound Architecture --> <M> ALSA for SoC audio support --> <M> ASoC Audio driver for Intel Cherrytrail & Braswell with RT5672 codec There is issue with switching between speaker/headphone, I'll try to fix it. Pierre, setting jd_mode to 2 fixes the speaker/headphone switching issue. Pierre, so published UCM with jd_mode 2 working on Lenovo Thinkpad Tablet 10, but what to do with Dell 5855? (bug 195195) I'm beginning to suspect that bug 150601 could be not kernel driver issue but some incompatibility between default UCM for rt286 and device? What you think? @Andrew: can you share the config that works please, I am getting lost with tons of emails with no code and UCM to look at. @RussianNeuroMancer: I can't figure out what the problem is, there is no published UCM with jd_mode_2 (UCM doesn't even have this notion) and rt286 is not used for any of those platforms and we don't have a UCM file for it. Pierre, as I understand Andrew still using same UCM as before, from Comment 46, but this time he tried this UCM with jd_mode forced to 2, as you suggested in Comment 58. Previously changing jd_mode doesn't make any difference (Comment 63) but this time with mentioned build options and kernel version (Comment 80) it was improvement (Comment 82). So I guess now you need to do what you plan to do in Comment 58 ("we'll have to break the quirks in two"). That was regarding Andrew's Lenovo Thinkpad Tablet 10. On my Dell 5855 with Andrew's UCM config I get this: bug 195195 (second comment). As for rt286 - thanks for clarification regarding UCM. If bug 150601 is not UCM issue, what else it could be? Is there anyone who can look into this issue? jd_mode is set at the kernel level, there's currently no way to force it using UCM. You are making inferences that aren't correct. > jd_mode is set at the kernel level Yes, this is what I mean and this is what I refer to here: > Previously changing jd_mode doesn't make any difference (Comment 63) but this > time with mentioned build options and kernel version (Comment 80) it was > improvement (Comment 82). @Pierre: I use this UCM config - Attachment 255917 [details]
One detail about jd_mode: my device is "Lenovo Miix 2 10" and it requires jd_mode=2 for the proper jack detection (not "Thinkpad Tablet 10" that may require a different jd_mode) can you try the branch https://github.com/plbossart/sound/tree/topic/lenovo it contains both the clock management and jdmode2 for your platform. if it works i'll send it to alsa-devel Thanks. Ok, I'll try. No sound, the driver doesn't load at all. Kernel config the same as was before, with the mainline kernel (rt5672 driver enabled only). would you mind trying with the kernel + config that works for you with the two patches from the branch on top? I have no means of testing any of this ok, where can I get this patches? just cherry-pick them from my branch ok I compiled and patched v4.12-rc4 and seems like all working fine. I'd be curious to know what causes audio not to work on my branch (which is really Mark Brown's for-next). Maybe it require some options that was turned off in my kernel config? Also one note - my subwoofer(on the keyboard dock) is still crackling in all cases and disabling the line out in the ucm doesn't help. Can this issue be related to some conflicting driver? no idea, it's the first time I hear about a subwoofer in a keyboard. (In reply to Andrew Y. from comment #89) > One detail about jd_mode: > > my device is "Lenovo Miix 2 10" and it requires jd_mode=2 for the proper > jack detection (not "Thinkpad Tablet 10" that may require a different > jd_mode) how do i know z3795 ThinkPad 8 jd mode ? i get speaker/headphone working,but plug in headphone,can't auto close speaker. (In reply to youling257 from comment #102) > (In reply to Andrew Y. from comment #89) > > One detail about jd_mode: > > > > my device is "Lenovo Miix 2 10" and it requires jd_mode=2 for the proper > > jack detection (not "Thinkpad Tablet 10" that may require a different > > jd_mode) > > how do i know z3795 ThinkPad 8 jd mode ? > > i get speaker/headphone working,but plug in headphone,can't auto close > speaker. What ucm config you're use? I've just tried a recently added config from https://github.com/plbossart/UCM and when I plugs in headphone, my speaker does not mutes too. With a ucm from attachment 255917 [details], it works. (In reply to Andrew Y. from comment #103) > (In reply to youling257 from comment #102) > > (In reply to Andrew Y. from comment #89) > > > One detail about jd_mode: > > > > > > my device is "Lenovo Miix 2 10" and it requires jd_mode=2 for the proper > > > jack detection (not "Thinkpad Tablet 10" that may require a different > > > jd_mode) > > > > how do i know z3795 ThinkPad 8 jd mode ? > > > > i get speaker/headphone working,but plug in headphone,can't auto close > > speaker. > > What ucm config you're use? > I've just tried a recently added config from > https://github.com/plbossart/UCM and when I plugs in headphone, my speaker > does not mutes too. With a ucm from attachment 255917 [details], it works. @@ -2,8 +2,8 @@ Value { TQ "HiFi" - PlaybackPCM "hw:cherrytrailcrau" - CapturePCM "hw:cherrytrailcrau" + PlaybackPCM "hw:chtbswrt5672" + CapturePCM "hw:chtbswrt5672" } EnableSequence [ @@ -10,4 +10,4 @@ - cdev "hw:cherrytrailcrau" + cdev "hw:chtbswrt5672" # Mixer @@ -145,10 +145,10 @@ cset "name='HPO MIX HPVOL Switch' on" # line out - cset "name='OUT MIXL DAC L1 Switch' on" - cset "name='OUT MIXR DAC R1 Switch' on" - cset "name='LOUT MIX OUTMIX L Switch' on" - cset "name='LOUT MIX OUTMIX R Switch' on" + # cset "name='OUT MIXL DAC L1 Switch' on" + # cset "name='OUT MIXR DAC R1 Switch' on" + # cset "name='LOUT MIX OUTMIX L Switch' on" + # cset "name='LOUT MIX OUTMIX R Switch' on" ] DisableSequence [ @@ -155,4 +155,4 @@ - cdev "hw:cherrytrailcrau" + cdev "hw:chtbswrt5672" # disable audio output path cset "name='codec_out1 mix 0 pcm0_in Switch' off" @@ -182,6 +182,7 @@ ConflictingDevice [ "Headphones" + "MonoSpeaker" ] EnableSequence [ @@ -188,4 +189,4 @@ - cdev "hw:cherrytrailcrau" + cdev "hw:chtbswrt5672" cset "name='Ext Spk Switch' on" ] @@ -192,5 +193,5 @@ DisableSequence [ - cdev "hw:cherrytrailcrau" + cdev "hw:chtbswrt5672" cset "name='Ext Spk Switch' off" ] } @@ -197,4 +198,29 @@ +SectionDevice."MonoSpeaker" { + Comment "MonoSpeaker" + + Value { + PlaybackChannels "2" + } + + ConflictingDevice [ + "Headphones" + "Speaker" + ] + + EnableSequence [ + cdev "hw:chtbswrt5672" + cset "name='Ext Spk Switch' on" + cset "name='Stereo DAC MIXL DAC R1 Switch' on" + ] + + DisableSequence [ + cdev "hw:chtbswrt5672" + cset "name='Ext Spk Switch' off" + cset "name='Stereo DAC MIXL DAC R1 Switch' off" + ] +} + SectionDevice."Headphones" { Comment "Headphones" @@ -205,6 +231,7 @@ ConflictingDevice [ "Speaker" + "MonoSpeaker" ] EnableSequence [ @@ -211,4 +238,4 @@ - cdev "hw:cherrytrailcrau" + cdev "hw:chtbswrt5672" cset "name='Headphone Switch' on" ] @@ -215,5 +242,5 @@ DisableSequence [ - cdev "hw:cherrytrailcrau" + cdev "hw:chtbswrt5672" cset "name='Headphone Switch' off" ] } @@ -226,11 +253,10 @@ } EnableSequence [ - cdev "hw:cherrytrailcrau" + cdev "hw:chtbswrt5672" cset "name='Int Mic Switch' on" cset "name='Stereo1 DMIC Mux' DMIC1" - cset "name='Stereo1 ADC L2 Mux' DMIC" - cset "name='Stereo1 ADC R2 Mux' DMIC" + cset "name='Stereo1 ADC 2 Mux' DMIC" cset "name='Sto1 ADC MIXL ADC2 Switch' on" cset "name='Sto1 ADC MIXR ADC2 Switch' on" cset "name='Sto1 ADC MIXL ADC1 Switch' off" @@ -238,7 +264,7 @@ ] DisableSequence [ - cdev "hw:cherrytrailcrau" + cdev "hw:chtbswrt5672" cset "name='Int Mic Switch' off" cset "name='Sto1 ADC MIXL ADC2 Switch' off" cset "name='Sto1 ADC MIXR ADC2 Switch' off" 1|android_x86:/ # (In reply to Andrew Y. from comment #103) > (In reply to youling257 from comment #102) > > (In reply to Andrew Y. from comment #89) > > > One detail about jd_mode: > > > > > > my device is "Lenovo Miix 2 10" and it requires jd_mode=2 for the proper > > > jack detection (not "Thinkpad Tablet 10" that may require a different > > > jd_mode) > > > > how do i know z3795 ThinkPad 8 jd mode ? > > > > i get speaker/headphone working,but plug in headphone,can't auto close > > speaker. > > What ucm config you're use? > I've just tried a recently added config from > https://github.com/plbossart/UCM and when I plugs in headphone, my speaker > does not mutes too. With a ucm from attachment 255917 [details], it works. i used these patches, ASoC: Intel: cht_bsw_rt5672: fix card name ASoC: Intel: cht_bsw_rt5672: use actual HID in suspend/resume ASoC: Intel: boards: use devm_clk_get() unconditionally ASoC: rt5670: merge ADC L/R Mux ASoC: rt5670: add symmetric_rates flag (In reply to Andrew Y. from comment #103) > (In reply to youling257 from comment #102) > > (In reply to Andrew Y. from comment #89) > > > One detail about jd_mode: > > > > > > my device is "Lenovo Miix 2 10" and it requires jd_mode=2 for the proper > > > jack detection (not "Thinkpad Tablet 10" that may require a different > > > jd_mode) > > > > how do i know z3795 ThinkPad 8 jd mode ? > > > > i get speaker/headphone working,but plug in headphone,can't auto close > > speaker. > > What ucm config you're use? > I've just tried a recently added config from > https://github.com/plbossart/UCM and when I plugs in headphone, my speaker > does not mutes too. With a ucm from attachment 255917 [details], it works. what reason?may be this ? # line out # cset "name='OUT MIXL DAC L1 Switch' on" # cset "name='OUT MIXR DAC R1 Switch' on" # cset "name='LOUT MIX OUTMIX L Switch' on" # cset "name='LOUT MIX OUTMIX R Switch' on You could try attachment 255917 [details] (or modify your existent config by removing a "MonoSpeaker" section and all its references, leaving "Speaker" and "Headphones").
If modifying a UCM doesn't help, you could try to change a jd_mode in sound/soc/codecs/rt5670.c (lines 2880-2890). (I'm not sure this is a safe way!) (In reply to Andrew Y. from comment #108) > If modifying a UCM doesn't help, you could try to change a jd_mode in > sound/soc/codecs/rt5670.c (lines 2880-2890). (I'm not sure this is a safe > way!) I forgot add ThinkPad 8 jd quirk on rt5670.c,i only add acpi quirk on sound/soc/intel/atom/sst/sst_acpi.c (In reply to Andrew Y. from comment #71) > Created attachment 255993 [details] > speaker + headphone registers (lenovo miix 2 10) my 5670 regmap speak/headphone register same https://bugzilla.kernel.org/show_bug.cgi?id=195195 (In reply to Andrew Y. from comment #108) > If modifying a UCM doesn't help, you could try to change a jd_mode in > sound/soc/codecs/rt5670.c (lines 2880-2890). (I'm not sure this is a safe > way!) Hi,did you test 4.13/4.14 kernel ? can't load correct machine driver in my case,need revert 7827d66946ad3af734ed46d1d68c23fa6974595c (In reply to youling257 from comment #111) > (In reply to Andrew Y. from comment #108) > > If modifying a UCM doesn't help, you could try to change a jd_mode in > > sound/soc/codecs/rt5670.c (lines 2880-2890). (I'm not sure this is a safe > > way!) > > Hi,did you test 4.13/4.14 kernel ? > can't load correct machine driver in my case,need revert > 7827d66946ad3af734ed46d1d68c23fa6974595c Yes, I tried 4.13, and sound driver doesn't load (In reply to Andrew Y. from comment #112) > (In reply to youling257 from comment #111) > > (In reply to Andrew Y. from comment #108) > > > If modifying a UCM doesn't help, you could try to change a jd_mode in > > > sound/soc/codecs/rt5670.c (lines 2880-2890). (I'm not sure this is a safe > > > way!) > > > > Hi,did you test 4.13/4.14 kernel ? > > can't load correct machine driver in my case,need revert > > 7827d66946ad3af734ed46d1d68c23fa6974595c > > Yes, I tried 4.13, and sound driver doesn't load try to revert 7827d66946ad3af734ed46d1d68c23fa6974595c https://github.com/youling257/android-4.9/commit/f51bda2b0aeba23e5162e38dc2ff69fac45d718a Created attachment 258581 [details]
fix for 4.13 machine driver selection
(In reply to Pierre Bossart from comment #114) > Created attachment 258581 [details] > fix for 4.13 machine driver selection can you test and check if this works for you? this fix works for me (4.14-rc2) (In reply to Andrew Y. from comment #116) > this fix works for me (4.14-rc2) Ah, I was wrong, without a fix, 4.14-rc2 works too (In reply to Andrew Y. from comment #117) > (In reply to Andrew Y. from comment #116) > > this fix works for me (4.14-rc2) > > Ah, I was wrong, without a fix, 4.14-rc2 works too Hmmm. There was no change on quirk handling between 4.13 and 4.14-rc2, so either both works or none work. Do you mind rechecking? Ok, I'll recheck this (In reply to Pierre Bossart from comment #118) > (In reply to Andrew Y. from comment #117) > > (In reply to Andrew Y. from comment #116) > > > this fix works for me (4.14-rc2) > > > > Ah, I was wrong, without a fix, 4.14-rc2 works too > > Hmmm. There was no change on quirk handling between 4.13 and 4.14-rc2, so > either both works or none work. Do you mind rechecking? I was confused about a missing in-kernel firmware(it has been recently removed), and I forgot, I had applied a revert patch before(as youling257 suggested), so it's a revert works for me, not a fix. does this mean that the patch on top of the mainline 4.13 or v4.14-rc2 works? (In reply to Pierre Bossart from comment #121) > does this mean that the patch on top of the mainline 4.13 or v4.14-rc2 works? yes (In reply to Andrew Y. from comment #122) > (In reply to Pierre Bossart from comment #121) > > does this mean that the patch on top of the mainline 4.13 or v4.14-rc2 > works? > > yes a revert patch works on both kernels, and a fix doesn't works I can't help you if you say yes then no without details or information. (In reply to Pierre Bossart from comment #124) > I can't help you if you say yes then no without details or information. I was mean this patch works: https://github.com/youling257/android-4.9/commit/f51bda2b0aeba23e5162e38dc2ff69fac45d718a from comment #113 but a fix you asked to test, from comment #114, doesn't works (In reply to Pierre Bossart from comment #114) > Created attachment 258581 [details] > fix for 4.13 machine driver selection This patch did not work for me on a Surface 3 machine, causing the same errors I already reported to the list[1]. Reverting 7827d66946ad3af734ed46d1d68c23fa6974595c works on the surface though. [1]: http://mailman.alsa-project.org/pipermail/alsa-devel/2017-October/126407.html (In reply to Bastien Nocera from comment #127) > (In reply to Pierre Bossart from comment #114) > > Created attachment 258581 [details] > > fix for 4.13 machine driver selection > > This patch did not work for me on a Surface 3 machine, causing the same > errors I already reported to the list[1]. Reverting > 7827d66946ad3af734ed46d1d68c23fa6974595c works on the surface though. > > [1]: > http://mailman.alsa-project.org/pipermail/alsa-devel/2017-October/126407.html Thanks for testing. I am pretty sure the quirk management does not work any longer, which causes the issue, but I can't figure out what's going on. If you could add some traces with printks to show how the machine is selected it'd help. *** Bug 197135 has been marked as a duplicate of this bug. *** Created attachment 260637 [details]
fix for 4.13+ machine driver selection
v2 of the patch, apparently works on Lenovo tablet, can folks try on additional devices?
Hi, thanks to all involved in the work on this chip. Your work makes it possible to ditch evil microsoft even on tablets. So thank you! I own a Lenovo Miix 2 10" and almost everything works out of the box. Guess what, sound is not. With rt5640 warnings at boot time. I'm able to install and run Linux (Manjaro) on this tablet and do whatever I need untill now, but I have no clue about how one patches the kernel... Would someone be kind enough to explain me or point me to a tutorial for newbies? Thanks in advance. (In reply to Gso6 from comment #131) > Hi, > thanks to all involved in the work on this chip. Your work makes it possible > to ditch evil microsoft even on tablets. So thank you! > I own a Lenovo Miix 2 10" and almost everything works out of the box. Guess > what, sound is not. With rt5640 warnings at boot time. > I'm able to install and run Linux (Manjaro) on this tablet and do whatever I > need untill now, but I have no clue about how one patches the kernel... > Would someone be kind enough to explain me or point me to a tutorial for > newbies? > Thanks in advance. If you need to patch your system, my recommendation is to use another (faster) development machine where you can clone the Linux tree, apply patches, build and install through e.g. ssh. I personally use ktest.pl scripts found in the kernel tree. I would avoid mucking with the packages and trying to do work on the tablet itself, it's possible but kinda slow. Thanks. This patch fixes sound on Lenovo Miix 2 10. Ubuntu mainline kernel 4.15.0-041500-generic with patch applied on sound/soc/soc-acpi.c (In reply to Mihail R from comment #133) > Thanks. This patch fixes sound on Lenovo Miix 2 10. > > Ubuntu mainline kernel 4.15.0-041500-generic with patch applied on > sound/soc/soc-acpi.c I have also Lenovo Miix 2 10 with Kernel 4.15.0-70-generic and sound doesn't work. How can I patch it? Is possible directly rewrite some files in kernel directory or using command patch on live system? Did you tried to boot Ubuntu 19.10 liveusb on your tablet just to check if this issue is still reproducible with fresh kernel and UCM configs? (In reply to RussianNeuroMancer from comment #135) > Did you tried to boot Ubuntu 19.10 liveusb on your tablet just to check if > this issue is still reproducible with fresh kernel and UCM configs? Sound doesn't work on Lenovo Miix 2 10 and Lenovo Miix 3 1030 with latest Ubuntu 19.10. With latest update of Fedora and installing Kernel 5.3.16-300, the sound on Lenovo Miix 2 10 appears but with very bad quality and noise. Still issue: Volume Up/Down until 0 is without any effect and sound is on maximum all the time. Anyway, there are still other problems for another bug reports: touchpad is not well supported and two finger scrolling doesn't work, time of (dis)charging is not correct, inserted microSD card is read only, screen light and volume control with keys on keyboard doesn't work. |