Created attachment 1472631 [details] dmesg output Description of problem: There is no sound output for internal speaker or headset in the linx7 tablet. The important error in dmesg is "Baytrail Audio Port: ASoC: no backend DAIs enabled for Baytrail Audio Port". It appears many times. Version-Release number of selected component (if applicable): Current 4.17.9 and earlier. How reproducible: always Steps to Reproduce: 1. Install Fedora 28 to lynx7 tablet. 2. Connect the headset or active speakers to the tablet. 3. See to system sound mixer(pulseaudio). Try to play any sound file. Actual results: There is the "dummy output" only in the system sound mixer. There are no any sound in the system. Expected results: There should be normal sound output in the system sound mixer. I must hear the sound. Additional info: The problem was described detailed here: https://forums.fedoraforum.org/showthread.php?318951-No-sound-in-linx7-tablet-intel-sst-audio-bug I gathered all data about the problem here: http://vps2.happyuser.info/lynx7-problem Perhaps there is a bug in the pulseaudio or alsa also.
Created attachment 1472635 [details] Errors from dmesg
Created attachment 1472636 [details] lsmod output
Created attachment 1472638 [details] aplay check result
Hi, For audio to work on Bay Trail or Cherry Trail bases devices you need to have an UCM profile for your device. I've been working on creating generic UCM profiles for these recently and upstream alsa-lib has these now for the RT5640 codec which your tablet seems to have. I've build alsa-lib rpms with the patches backported, you can download these here: https://fedorapeople.org/~jwrdegoede/alsa-lib-ucm/ Download the alsa-lib-1.1.6... and alsa-ucm-1.1.6... files and in a directory with both these files run: sudo rpm -Uvh alsa-*.rpm To install the new version, then do: killall pulseaudio After this you should have working sound. Chances are that your device has only a single speaker and needs a kernel quirk to mark it as such, to test this go to the sound settings in gnome-control-center and hit the "test speakers" button, you will likely only hear sound for the left speaker. To test if the mono speaker quirk helps, add the following to the kernel commandline: snd_soc_sst_bytcr_rt5640.quirk=0x563432 Your device may also need a quirk for the internal microphone and for detecting if headphones/a-headset are plugged in. To test the internal microphone do: sudo dnf install gnome-sound-recorder And then run gnome-sound-recorder (without any headphones / headset plugged in) and make a test recording. If this does not work, try using the following quirk setting instead: snd_soc_sst_bytcr_rt5640.quirk=0x563433 Notice the last 2 has changed to a 3 and no other changes. Once you've the microphone working, please test that headphones get seen when plugged in (they should show up in the sound settings in gnome-control-center) if you had to change the quirk for the microphone you likely also need to change it for jack-detect into: snd_soc_sst_bytcr_rt5640.quirk=0x563423 Note this time the second to last number has changed from 3 to 2. So if you did not need to change the microphone settings, but the jack detect is not working with the defaults, then this becomes: snd_soc_sst_bytcr_rt5640.quirk=0x563422 Please let me know if the updated alsa-lib fixes things and what the rights quirks are for your device. When you know the right quirks please also run the following command as a user, not as root : grep . /sys/class/dmi/id/* 2>/dev/null And copy and paste the output here, this will allow me to add the correct quirks to the quirk table in the kernel so that future kernel versions will do the right thing automatically.
Hi. You are a genius! I installed the required rpms and a stereo sound appeared in headset! The internal mono speaker work normally too - I hear the sound from both left and right channels. I did not use any quirk. Then I disconnected the headset and begun to test the microphone. The gnome-sound-recorder is slightly incompatible with MATE and has not the visual indicator. So I use the audacity instead. Also I use the visual indicator of input level in input tab of system sound preferences. I checked the following settings of "connector" in input tab of system sound preferences: 1) Internal digital microphones 2) Internal microphone on IN1 3) Internal microphone on IN3 4) Headset microphone There are no other variants there. Test result: With no quirk and with following quirks: snd_soc_sst_bytcr_rt5640.quirk=0x563432 snd_soc_sst_bytcr_rt5640.quirk=0x563433 The microphone does not work. I did not try the other quirks. But if it is important or I need to do something else, please let me to know. To specify a quirk I changed the GRUB_CMDLINE_LINUX in /etc/default/grub and run grub2-mkconfig -o /boot/efi/EFI/fedora/grub.cfg I think perhaps there is need some tuning in alsamixer also. This is output when no qirk is used: $ grep . /sys/class/dmi/id/* 2>/dev/null /sys/class/dmi/id/bios_date:10/18/2014 /sys/class/dmi/id/bios_vendor:American Megatrends Inc. /sys/class/dmi/id/bios_version:5.6.5 /sys/class/dmi/id/board_asset_tag:To be filled by O.E.M. /sys/class/dmi/id/board_name:LINX7 /sys/class/dmi/id/board_vendor:LINX /sys/class/dmi/id/board_version:To be filled by O.E.M. /sys/class/dmi/id/chassis_asset_tag:To Be Filled By O.E.M. /sys/class/dmi/id/chassis_type:3 /sys/class/dmi/id/chassis_vendor:To Be Filled By O.E.M. /sys/class/dmi/id/chassis_version:To Be Filled By O.E.M. /sys/class/dmi/id/modalias:dmi:bvnAmericanMegatrendsInc.:bvr5.6.5:bd10/18/2014:svnLINX:pnLINX7:pvrTobefilledbyO.E.M.:rvnLINX:rnLINX7:rvrTobefilledbyO.E.M.:cvnToBeFilledByO.E.M.:ct3:cvrToBeFilledByO.E.M.: /sys/class/dmi/id/product_family:To be filled by O.E.M. /sys/class/dmi/id/product_name:LINX7 /sys/class/dmi/id/product_version:To be filled by O.E.M. /sys/class/dmi/id/sys_vendor:LINX /sys/class/dmi/id/uevent:MODALIAS=dmi:bvnAmericanMegatrendsInc.:bvr5.6.5:bd10/18/2014:svnLINX:pnLINX7:pvrTobefilledbyO.E.M.:rvnLINX:rnLINX7:rvrTobefilledbyO.E.M.:cvnToBeFilledByO.E.M.:ct3:cvrToBeFilledByO.E.M.:
Hi, To get the microphone to work (and also jack-detect) you need a 4.18 kernel, you can find a Fedora 4.18 kernel build here: https://koji.fedoraproject.org/koji/buildinfo?buildID=1129888 Here are generic instructions for installing a kernel directly from koji: https://fedorapeople.org/~jwrdegoede/kernel-test-instructions.txt Please retest the microphone and jack-detect with that kernel. Regards, Hans
Hi Hans! I installed the kernel 4.18 and everything are super! The microphone works ideally. Even after I connected the headset. I don't use any quirk. I don't understand well what is a jack-detect and how to check it. Anyway there is a switcher "connector" (headphones/speakers) in output tab. I can programmatically switch the sound output. It's very useful. If you need I will check something else, please explain me how. For info: now the variants for "connector" in the input tab are: 1) Internal microphone on IN3 2) Headset microphone Regards, Sergiy.
By the way, now in the internal speaker I hear the left channel only.
(In reply to sergiyvovk69 from comment #7) > I installed the kernel 4.18 and everything are super! The microphone works > ideally. Even after I connected the headset. I don't use any quirk. Ok, does recording from the mic work even if you select "Internal microphone on IN3" on the sound-settings input tab? > I don't understand well what is a jack-detect and how to check it. Anyway > there is a switcher "connector" (headphones/speakers) in output tab. I can > programmatically switch the sound output. It's very useful. The headphones (and "Headset microphone") options should go away when you unplug your headphones / headset. (In reply to sergiyvovk69 from comment #8) > By the way, now in the internal speaker I hear the left channel only. Ok, please try adding the snd_soc_sst_bytcr_rt5640.quirk=0x563432 option to the kernel commandline, after that the output tab should show "Mono Speaker" instead of speakers and both left and right channels should be mixed together to the single speaker you have.
(In reply to Hans de Goede from comment #9) > The headphones (and "Headset microphone") options should go away when you > unplug your headphones / headset. The jack-detect does not work. I unplugged the headset and nothing changed in the sound preferences. Even after I rebooted the system. > Ok, please try adding the snd_soc_sst_bytcr_rt5640.quirk=0x563432 option to > the kernel commandline, after that the output tab should show "Mono Speaker" > instead of speakers and both left and right channels should be mixed > together to the single speaker you have. I did so and it works! I indeed see "mono speaker" instead "speakers" and left/right channels are mixed. > Ok, does recording from the mic work even if you select "Internal microphone > on IN3" on the sound-settings input tab? When no quirk was used - yes, it worked. But now the microphone does not work. Even if the headset is unplugged. Seems like that quirk is "good" for mono speaker and "bad" for microphone. Now the variants in input tab are: 1) Internal microphone on IN1 2) Headset microphone Note, I have not the another microphone in the headset. The tablet even has not the special input plug for it. The "Headset microphone" option in the input tab is redundant. Please let me know if I need to try other quirks.
Please try using snd_soc_sst_bytcr_rt5640.quirk=0x563423 as quirk instead, that should fix the microphone and hopefully also jack-detect.
At the first I tried: snd_soc_sst_bytcr_rt5640.quirk=0x563433 - microphone works. Even when headset is connected. jack-detect does not work. Then I tried: snd_soc_sst_bytcr_rt5640.quirk=0x563423 - the same situation as for 0x563433. I disconnected the headset and still see for input tab: 1) Internal microphone on IN3 2) Headset microphone and for output tab: 1) Mono speaker 2) Headphones Even after I rebooted the system.
Hi, I find it somewhat weird that jack-detect does not work, are you sure you've tried both 2 and 3 as the second to last number? IOW both: snd_soc_sst_bytcr_rt5640.quirk=0x563423 and: snd_soc_sst_bytcr_rt5640.quirk=0x563433 Please do "cat /proc/cmdline" to verify that you did not miss a step in modifying the kernel commandline. If that does not work you can also try 4 5 and 6 as second to last number, so: snd_soc_sst_bytcr_rt5640.quirk=0x563443 snd_soc_sst_bytcr_rt5640.quirk=0x563453 snd_soc_sst_bytcr_rt5640.quirk=0x563463 This corresponds to the jack-detect switch being connected to GPIO2 - GPIO4 of the codec. But I have never seen a tablet use those yet.
Yes, I am sure. Deep checking the jack-detect: $ cat /proc/cmdline BOOT_IMAGE=/boot/vmlinuz-4.18.0-0.rc6.git0.1.fc29.x86_64 root=UUID=9cf362ab-27de-43aa-b896-889b33189994 ro rhgb quiet snd_soc_sst_bytcr_rt5640.quirk=0x563423 - Does not work properly. But I noticed that after I connect the headset the output connector automatically changes to "mono speaker". And after I disconnect the headset the output connector automatically changes to "headphones". The action is "inverted". It is weird. $ cat /proc/cmdline BOOT_IMAGE=/boot/vmlinuz-4.18.0-0.rc6.git0.1.fc29.x86_64 root=UUID=9cf362ab-27de-43aa-b896-889b33189994 ro rhgb quiet snd_soc_sst_bytcr_rt5640.quirk=0x563433 - Does not work. $ cat /proc/cmdline BOOT_IMAGE=/boot/vmlinuz-4.18.0-0.rc6.git0.1.fc29.x86_64 root=UUID=9cf362ab-27de-43aa-b896-889b33189994 ro rhgb quiet snd_soc_sst_bytcr_rt5640.quirk=0x563443 - Does not work. $ cat /proc/cmdline BOOT_IMAGE=/boot/vmlinuz-4.18.0-0.rc6.git0.1.fc29.x86_64 root=UUID=9cf362ab-27de-43aa-b896-889b33189994 ro rhgb quiet snd_soc_sst_bytcr_rt5640.quirk=0x563453 - Does not work. $ cat /proc/cmdline BOOT_IMAGE=/boot/vmlinuz-4.18.0-0.rc6.git0.1.fc29.x86_64 root=UUID=9cf362ab-27de-43aa-b896-889b33189994 ro rhgb quiet snd_soc_sst_bytcr_rt5640.quirk=0x563463 - Does not work.
(In reply to sergiyvovk69 from comment #14) > Yes, I am sure. > > Deep checking the jack-detect: > > $ cat /proc/cmdline > BOOT_IMAGE=/boot/vmlinuz-4.18.0-0.rc6.git0.1.fc29.x86_64 > root=UUID=9cf362ab-27de-43aa-b896-889b33189994 ro rhgb quiet > snd_soc_sst_bytcr_rt5640.quirk=0x563423 > - Does not work properly. But I noticed that after I connect the headset the > output connector automatically changes to "mono speaker". > And after I disconnect the headset the output connector automatically > changes to "headphones". > The action is "inverted". It is weird. Ah interesting, so your jack-detect is inverted. Can you try with: snd_soc_sst_bytcr_rt5640.quirk=0x573423 That also sets the flag for inverted jack-detect, I think that with that added everything should work 100% for your tablet, if you can confirm this then I will submit a patch to the upstream kernel with those quirk settings.
Hi. $ cat /proc/cmdline BOOT_IMAGE=/boot/vmlinuz-4.18.0-0.rc6.git0.1.fc29.x86_64 root=UUID=9cf362ab-27de-43aa-b896-889b33189994 ro rhgb quiet snd_soc_sst_bytcr_rt5640.quirk=0x573423 Everything works ideally! I confirm it by 100%. I connected the headset and the output connector automatically changed to "headphones". I disconnected the headset and the output connector automatically changed to "mono speaker". I also tried the external big active speakers instead of headset. The jack-detect worked as well as for headset. I rechecked the sound playing and microphone. Everything works fine. A big thanks to you for the great work!
You asked to do this when everything will work. $ grep . /sys/class/dmi/id/* 2>/dev/null /sys/class/dmi/id/bios_date:10/18/2014 /sys/class/dmi/id/bios_vendor:American Megatrends Inc. /sys/class/dmi/id/bios_version:5.6.5 /sys/class/dmi/id/board_asset_tag:To be filled by O.E.M. /sys/class/dmi/id/board_name:LINX7 /sys/class/dmi/id/board_vendor:LINX /sys/class/dmi/id/board_version:To be filled by O.E.M. /sys/class/dmi/id/chassis_asset_tag:To Be Filled By O.E.M. /sys/class/dmi/id/chassis_type:3 /sys/class/dmi/id/chassis_vendor:To Be Filled By O.E.M. /sys/class/dmi/id/chassis_version:To Be Filled By O.E.M. /sys/class/dmi/id/modalias:dmi:bvnAmericanMegatrendsInc.:bvr5.6.5:bd10/18/2014:svnLINX:pnLINX7:pvrTobefilledbyO.E.M.:rvnLINX:rnLINX7:rvrTobefilledbyO.E.M.:cvnToBeFilledByO.E.M.:ct3:cvrToBeFilledByO.E.M.: /sys/class/dmi/id/product_family:To be filled by O.E.M. /sys/class/dmi/id/product_name:LINX7 /sys/class/dmi/id/product_sku:LINX7 /sys/class/dmi/id/product_version:To be filled by O.E.M. /sys/class/dmi/id/sys_vendor:LINX /sys/class/dmi/id/uevent:MODALIAS=dmi:bvnAmericanMegatrendsInc.:bvr5.6.5:bd10/18/2014:svnLINX:pnLINX7:pvrTobefilledbyO.E.M.:rvnLINX:rnLINX7:rvrTobefilledbyO.E.M.:cvnToBeFilledByO.E.M.:ct3:cvrToBeFilledByO.E.M.:
Hi, Ok, I've just submitted a patch upstream adding a quirk for your tablet, so hopefully in kernel-4.19, but maybe 4.20, you will no longer need to specify the quirk on your kernel commandline: http://mailman.alsa-project.org/pipermail/alsa-devel/2018-August/139354.html In the mean time you can keep using the quirk on the commandline. Thank you for providing the necessary info to get this fixed. Regards, Hans