Home of the Squeezebox™ & Transporter® network music players.
Results 1 to 4 of 4
  1. #1

    Waveshare WM8960 HAT

    Hi,

    I have a Waveshare WM8960 1 Watt amp HAT and speakers that I would like to get working with piCorePlayer. Seems pretty clear to me that it is not supported at present; I can see one other post here where someone has mentioned a WM8960 based card and given up. I know I there's a lot of alternative known good options for not much money but:
    • the whole package, which includes headphone output, stereo speakers and a handy button, is quite neat
    • I've bought it now (all be it on the cheap)
    • it would be a interesting to learn the TinyCore way
    • if it works I can give something back to the piCorePlayer community

    Here's the Waveshare support info https://www.waveshare.com/wiki/WM8960_Audio_HAT

    The driver code is here: https://github.com/waveshare/WM8960-Audio-HAT

    The build process is designed for Raspbian, apt, dpkg etc. but I figure I'll massage the script to get the driver to build on piCore.

    I grabbed the kernel source V5.4.83 to match the piCore 7 kernel version, linked it to the right place, did a couple of other tweaks and eventually convinced make to begin to compile the kernel module.

    Compilation fails with various errors but lets start with the first one and see if the fix for that informs the subsequent errors. The error message clearly states that a function (snd_soc_component_read()) is given 2 arguments but expects 3. Digging around in https://elixir.bootlin.com I gather that function has changed at some point after my current kernel V5.4.83.

    I've stopped short of posting the fine details of the errors for now. I'd like to establish if my general approach is correct first. What to do when you have driver code written for a later kernel?

    So many questions:
    1. Do we have a feel for when the kernel will be upgraded next in piCorePlayer? TinyCore 13 is kernel 5.10.16 which has the newer version of the function. Am I best to wait till that time?
    2. Do I go ahead and hack at the c code? Not only does the function take different arguments, it returns differently too but its function is still basically the same.
    3. Might there be a trick where I compile against later kernel source and it still work?
    4. Am I going about this completely wrong?


    Thanks in advance

    Tom

  2. #2
    Senior Member
    Join Date
    Apr 2005
    Location
    UK/London
    Posts
    4,358
    An upcoming pCP 8 has been mentioned in here by the pCP team which will have a newer kernel ... maybe it has what you will need.
    If no-one from pCP team responds here then maybe post in pCP 7.0 thread to ask there.
    Paul Webster
    http://dabdig.blogspot.com
    Author of "Now Playing" plugins covering Radio France (FIP etc), PlanetRadio (Bauer - Kiss, Absolute, Scala, JazzFM etc), KCRW, Supla Finland, ABC Australia, CBC/Radio-Canada and RTE Ireland

  3. #3
    Senior Member Greg Erskine's Avatar
    Join Date
    Sep 2006
    Location
    Sydney, Australia
    Posts
    2,253
    hi mistakenot,

    Our current pCP8.0.0 beta in testing is using linux 5.10.33-pcpCore-v8 (64)

    It looks like Waveshare has had the driver included so it will be available.

    Code:
    Name:   wm8960-soundcard
    Info:   Overlay for the Waveshare wm8960 soundcard
    Load:   dtoverlay=wm8960-soundcard,<param>=<val>
    Params: alsaname                Changes the card name in ALSA
            compatible              Changes the codec compatibility
    I don't have a pCP7 at the moment so can't confirm it is not already included.

    Available sound cards should appear under "Output setting" more> help.

    regards
    Greg

  4. #4

    Good news

    Thanks for the quick replies Greg and Paul,

    I think that means I wait for the pcp 8 then. Any feel for when it will be ready?

    If you need a tester for this particular device let me know.

    Cheers

    Tom

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •