[alsa-devel] WM9712/WM9715 - WM97XXPENDOWN issue

Tony Prisk linux at prisktech.co.nz
Tue Mar 8 03:47:23 CET 2011


I have any issue with the WM9712 codec that I was hoping someone might be familiar with.



I actually have a Wondermedia WM8505 based netbook with the WM9715 codec - although it seems to be compatible with the WM9711/WM9712.



I have written the required ASoC support for this board/platform, and wm97xx battery support is working correctly except for one issue.



Touchscreen support is required, but not available on this unit (not really an issue outright, but the cause of the problem).

Without removing the following code, wm9712_poll_sample always fails when reading the battery ADC.



static int wm9712_poll_sample(struct wm97xx *wm, int adcsel, int *sample) ...

        /* check we have correct sample */

        if ((*sample & WM97XX_ADCSEL_MASK) != adcsel) {

                dev_dbg(wm->dev, "adc wrong sample, read %x got %x", adcsel,

                *sample & WM97XX_ADCSEL_MASK);

                return RC_PENUP;

        }

/* <--- PROBLEM CODE HERE --->

        if (!(*sample & WM97XX_PEN_DOWN)) {

                wm->pen_probably_down = 0;

                return RC_PENUP;

        }

*/

        return RC_VALID;

}



Is it possible that with no touchscreen attached, the codec is returning WM97XX_PEN_DOWN on all ADC reads?



Any suggestions welcome.





Tony Prisk



More information about the Alsa-devel mailing list