On 5/4/16 8:21 PM, Paulo Sergio wrote:
Hi list, I've been trying to make Lenovo Yoga 2 (Model 1051F) sound work on Android-x86/ Linux. [1] Based on already discussed info from Christian Hartmann with members (see [2] and [3] ) of this list and some efforts (basically patch pxa2xx with Mika Westerberg changes, set the correct gpio int values {246 for reset / 405 for ldoena and 342 for irq_gpio} and set LDO1 vcc suppliers) we could have wm5102 initialized through spi / regmap (arizona code on drivers/mfd) and register the DAI's. I also ported a machine driver code from a kernel Lenovo made available for a similar hardware (Lenovo yoga 2 1050 - uses the same baytrail Z3745 and wolfson wm5102 audio) [4]
There are quite a few references in the machine driver to concepts related to Clovertrail+ and early versions of Baytrail. I am fairly convinced the mentions of 'BYT_COMMS_BT' or 'modem mixing' are no longer supported with the DPCM platform driver/firmware you used.
To enable this codec it would be simpler to start with a newer machine driver derived from the bytcr_rt5640 one, with just a basic SSP0-aif1 link for starters (+ MCLK). Better yet, do this work with a MinnowBoard and an WM5102 eval board and test all this with more control on how the hardware is setup.
If you stick to working directly on the Lenovo device, make sure you use all the DSP controls set in the UCM files used for baytrail/baytrail-CR (see github.com/plbossart/UCM).
Although machine driver is registered, we still don't have sound. Tried some mixer settings / routes used on raspberry pi, but none help. Application (in this case alsa / Android players) returns a "Device or resource busy" when trying to ioctl pcm device: 04-30 13:05:07.877 1784 2078 E audio_hw_primary: out_write: error -1 - cannot prepare channel: Device or resource busy # This is raised here (external/tinyalsa/pcm.c): if (ioctl(pcm->fd, SNDRV_PCM_IOCTL_PREPARE) < 0) return oops(pcm, errno, "cannot prepare channel"); Note: As pointed here [5] had to change the acpi_ipc_irq_index to 0 on sound/soc/intel/atom/sst/sst_acpi.c because this is the 1st ACPI entry listed on DSDT I'm also trying to use a fw version that uses SSP0 [6] instead of SSP2 used as default - but no sound with both I'd like some help from you in order to make this work. I've collect several info which can be found here [7] - /proc/asound/cards - /proc/interrupts - amixer controls list - dmesg - DSDT file (decoded with iasl) Source code with changes made so far is available on github [8] Any hint is appreciated Thanks, Paulo Sérgio Travaglia (pstglia) [1] - https://groups.google.com/forum/#!forum/android-x86 [2] - http://www.spinics.net/lists/linux-acpi/msg58680.html [3] - https://goo.gl/vBKOeI [4] - http://goo.gl/zriwbw [5] - https://bugzilla.kernel.org/show_bug.cgi?id=86581 [6] - http://thread.gmane.org/gmane.linux.alsa.devel/134554/focus=140634 [7] - https://drive.google.com/folderview?id=0BxO6THtB865fWjVHLTFfV25ORjQ&usp=sharing [8] - https://github.com/pstglia/linux
_______________________________________________ Alsa-devel mailing list Alsa-devel@xxxxxxxxxxxxxxxx http://mailman.alsa-project.org/mailman/listinfo/alsa-devel