You are not logged in.

#1 2019-10-08 00:28:18

xenobro
Member
Registered: 2019-05-25
Posts: 14

es8316 issues on Positivo Q432A

Hi everyone, I've been getting the following sound issues on my Positivo 2 in 1 Q432A laptop, motherboard CHT12CP (3601127), soundcard reported as bytcht-es8316 by alsamixer:
When installing an Arch system from scratch, after installing alsa-lib and alsa-utils only, there's no sound whatsoever, on speakers or headphones, no matter what I do, and alsamixer reports the default as HDMI LPE Audio, even though there's no volume controls for that and there's nothing connected to that port; I can change to the bytcht-es8316 controls with F6, but even though there's 160+ controls there, nothing works.
If I install pulseaudio and pulseaudio-alsa however, reboot, run alsamixer, F6, and unmute speakers, they work fine, but plugging the headphones turns them on and lowers the speakers volume, unplugging hps mutes the speakers, and plugging them back turns both hps and speakers on; this is solved by unplugging hps and unmuting speakers manually again, but on next reboot they'll be "remuted" and have to be unmuted manually at every startup. Also, there are still 160+ controls on bytcht-es8316, though most have no effect on sound output, and no other channels (e.g. internal microphones, headset microphones, etc.) work.
There's a script (or small variations of it) going around the net that seems to claim to solve these issues in Ubuntu and Debian, as seen here (pt_BR) and here, mainly referencing this page(in Chinese) and this video, though one of the posts in the second page mentions altering the sources as told by this post on bugzilla, and the video points to this tar. Here's the main version of the script:

clear
if [ ! "`whoami`" = "root" ]
then
    echo "Please run script as root."
    exit 1
else echo "( ͡° ͜ʖ ͡°) Script Made By Shuncey Balba ( ͡° ͜ʖ ͡°)"
fi
touch install.log
chmod 777 install.log
echo Downloading Files
p_url="https://raw.githubusercontent.com/dsd/linux/es8316"
files="
sound/soc/codecs/es8316.c
sound/soc/codecs/es8316.h
sound/soc/codecs/Makefile
sound/soc/codecs/Kconfig
sound/soc/intel/Kconfig
sound/soc/intel/boards/Makefile
sound/soc/intel/boards/cht_bsw_es8316.c
sound/soc/intel/boards/bytcht_es8316.c
sound/soc/intel/sst/atom/sst_acpi.c
sound/soc/intel/atom/sst/sst_acpi.c
sound/soc/intel/atom/sst-atom-controls.h
sound/soc/intel/common/sst-acpi.h
sound/soc/intel/common/sst-dsp.h
sound/soc/intel/atom/sst-mfld-platform.h
sound/soc/intel/atom/sst/sst.h
sound/soc/intel/atom/sst-mfld-dsp.h
"
for f in $files
do
    echo $f > install.log 2>&1
    mkdir -p `dirname $f` > install.log 2>&1
    wget $p_url/$f > install.log 2>&1 
    mv `basename $f` $f > install.log 2>&1
done
rm sound/soc/codecs/Makefile
    rm sound/soc/intel/boards/Makefile
    echo "snd-soc-es8316-objs := es8316.o
obj-m    += snd-soc-es8316.o" >> sound/soc/codecs/Makefile
chmod +x sound/soc/codecs/Makefile

echo "snd-soc-sst-byt-cht-es8316-objs := bytcht_es8316.o
obj-m += snd-soc-sst-byt-cht-es8316.o" >> sound/soc/intel/boards/Makefile
chmod +x sound/soc/intel/boards/Makefile

echo "snd-intel-sst-acpi-objs += sst_acpi.o
obj-m += snd-intel-sst-acpi.o" >> sound/soc/intel/atom/sst/Makefile
chmod +x sound/soc/intel/atom/sst/Makefile

echo Compiling

# ubuntu
C_FLAGS="-C /usr/src/linux-headers-`uname -r`"
# opensuse
# C_FLAGS="-C /usr/src/linux-`uname -r`"
c_dir=`pwd`
for mf in `find $c_dir -type f -name "Makefile"`
do
    echo $mf > install.log 2>&1
    cd `dirname $mf` > install.log 2>&1
    make $C_FLAGS M=`pwd` modules > install.log 2>&1
    mv *.ko $c_dir > install.log 2>&1
    cd $c_dir > install.log 2>&1
done

echo Inserting snd-intel-sst-acpi.ko to Kernel
if insmod snd-intel-sst-acpi.ko > install.log 2>&1 ; then
    printf 'Modules inserted To Kernel Succesfully
'
else
    printf 'snd-intel-sst-acpi.ko Already Exists
'
fi
echo Inserting snd-soc-sst-byt-cht-es8316.ko to Kernel
if insmod snd-soc-sst-byt-cht-es8316.ko > install.log 2>&1 ; then
    printf 'snd-soc-sst-byt-cht-es8316.ko inserted To Kernel Succesfully
'
else
    printf 'snd-soc-sst-byt-cht-es8316.ko Already Exists
'
fi
echo Inserting snd-soc-es8316.ko to Kernel
if insmod snd-soc-es8316.ko > install.log 2>&1 ; then
    printf 'snd-soc-es8316.ko inserted To Kernel Succesfully
'
else
    printf 'snd-soc-es8316.ko Already Exists
'
fi

echo "Downloading And Extracting UCM files..."
PURGE_UNZIP=false && [ ! $(sudo bash -c "command -v unzip") ] && sudo apt -y install unzip > /dev/null 2>&1 && PURGE_UNZIP=true
sudo rm -rf UCM
sudo mkdir UCM
cd UCM
sudo wget --timeout=10 "https://github.com/plbossart/UCM/archive/master.zip" > /dev/null 2>&1
sudo unzip master.zip > /dev/null 2>&1
sudo rm -f master.zip
echo "Installing UCM Files..."
sudo mkdir -p /usr/share/alsa/ucm
sudo cp -rf UCM-master/* /usr/share/alsa/ucm
sudo cp -rf /usr/share/alsa/ucm/bytcr-rt5651/asound.state /var/lib/alsa
sudo rm -rf UCM-master
sudo mkdir /usr/share/alsa/ucm/bytcht-es8316 > install.log 2>&1
sudo wget --timeout=10 "https://github.com/kernins/linux-chwhi12/raw/master/configs/audio/ucm/bytcht-es8316/HiFi" -O /usr/share/alsa/ucm/bytcht-es8316/HiFi > /dev/null 2>&1
sudo wget --timeout=10 "https://github.com/kernins/linux-chwhi12/raw/master/configs/audio/ucm/bytcht-es8316/bytcht-es8316.conf" -O /usr/share/alsa/ucm/bytcht-es8316/bytcht-es8316.conf > /dev/null 2>&1
# add HdmiLpeAudio.conf
sed '1,/^exit$/d' < ../$0 | base64 -d > install.log 2>&1 | sudo tee $0.zip > /dev/null 2>&1
sudo unzip $0.zip > /dev/null 2>&1
sudo rm -f $0.zip
sudo mkdir -p /usr/share/alsa/cards > install.log 2>&1
sudo cp HdmiLpeAudio.conf /usr/share/alsa/cards > install.log 2>&1
cd ..
sudo rm -rf UCM
[ ${PURGE_UNZIP} ] && sudo apt -y purge unzip > /dev/null 2>&1
echo "Finished Installing UCM Files"


echo "blacklist snd_hdmi_lpe_audio" > /etc/modprobe.d/blacklist_hdmi.conf
echo Cleaming Up
sudo rm -rf sound
sudo rm -rf install.log
sudo rm -rf snd-intel-sst-acpi.ko 
sudo rm -rf snd-soc-es8316.ko
sudo rm -rf snd-soc-sst-byt-cht-es8316.ko 
echo "Donate -> https://www.paypal.me/shunceybalbacid";
echo "Does Sound Work? If not plug in your Headphones Wait for 10 Seconds To Continue"
timeout 10s speaker-test -t wav -c 6 > install.log 2>&1
while true; do
   
    read -p "Do you want to reboot now? Y/N: " yn
    case $yn in
        [Yy]* ) reboot;;
        [Nn]* ) exit;;
        * ) echo ;;
    esac
done

I'm trying to adapt that script to Arch, but after making sure I've installed the linux-headers, altering the $C_FLAGS variable to "-C /lib/modules/`uname -r`/build" and using the exact same sources of any of the variations of the scripts, I kept getting silent fails, so trying to run it piece by piece, I found out these errors when trying to compile the modules:

[x@archlinux codecs] $ pwd
/xbkp/es8316/sound/soc/codecs
[x@archlinux codecs] $ make -C /lib/modules/`uname -r`/build M=`pwd` modules
make: Entering directory '/usr/lib/modules/5.3.4-arch1-1-ARCH/build'
  CC [M]  /xbkp/es8316/sound/soc/codecs/es8316.o
/xbkp/es8316/sound/soc/codecs/es8316.c:50:32: warning: ‘struct snd_soc_codec’ declared inside parameter list will not be visible outside of this definition or declaration
   50 | static int es8316_reset(struct snd_soc_codec *codec)
      |                                ^~~~~~~~~~~~~
/xbkp/es8316/sound/soc/codecs/es8316.c: In function ‘es8316_reset’:
/xbkp/es8316/sound/soc/codecs/es8316.c:52:2: error: implicit declaration of function ‘snd_soc_write’; did you mean ‘snd_ac97_write’? [-Werror=implicit-function-declaration]
   52 |  snd_soc_write(codec, ES8316_RESET_REG00, 0x3F);
      |  ^~~~~~~~~~~~~
      |  snd_ac97_write
/xbkp/es8316/sound/soc/codecs/es8316.c: In function ‘es8316_set_dai_sysclk’:
/xbkp/es8316/sound/soc/codecs/es8316.c:466:41: error: ‘struct snd_soc_dai’ has no member named ‘codec’
  466 |  struct snd_soc_codec *codec = codec_dai->codec;
      |                                         ^~
/xbkp/es8316/sound/soc/codecs/es8316.c:467:31: error: implicit declaration of function ‘snd_soc_codec_get_drvdata’; did you mean ‘snd_soc_dai_get_drvdata’? [-Werror=implicit-function-declaration]
  467 |  struct es8316_priv *es8316 = snd_soc_codec_get_drvdata(codec);
      |                               ^~~~~~~~~~~~~~~~~~~~~~~~~
      |                               snd_soc_dai_get_drvdata
/xbkp/es8316/sound/soc/codecs/es8316.c:467:31: warning: initialization of ‘struct es8316_priv *’ from ‘int’ makes pointer from integer without a cast [-Wint-conversion]
/xbkp/es8316/sound/soc/codecs/es8316.c: In function ‘es8316_set_dai_fmt’:
/xbkp/es8316/sound/soc/codecs/es8316.c:497:41: error: ‘struct snd_soc_dai’ has no member named ‘codec’
  497 |  struct snd_soc_codec *codec = codec_dai->codec;
      |                                         ^~
/xbkp/es8316/sound/soc/codecs/es8316.c:504:13: error: implicit declaration of function ‘snd_soc_read’; did you mean ‘snd_soc_cnew’? [-Werror=implicit-function-declaration]
  504 |  iface    = snd_soc_read(codec, ES8316_IFACE);
      |             ^~~~~~~~~~~~
      |             snd_soc_cnew
/xbkp/es8316/sound/soc/codecs/es8316.c: In function ‘es8316_pcm_startup’:
/xbkp/es8316/sound/soc/codecs/es8316.c:589:35: error: ‘struct snd_soc_dai’ has no member named ‘codec’
  589 |  struct snd_soc_codec *codec = dai->codec;
      |                                   ^~
/xbkp/es8316/sound/soc/codecs/es8316.c:590:31: warning: initialization of ‘struct es8316_priv *’ from ‘int’ makes pointer from integer without a cast [-Wint-conversion]
  590 |  struct es8316_priv *es8316 = snd_soc_codec_get_drvdata(codec);
      |                               ^~~~~~~~~~~~~~~~~~~~~~~~~
/xbkp/es8316/sound/soc/codecs/es8316.c:607:2: error: implicit declaration of function ‘snd_soc_update_bits’; did you mean ‘snd_ac97_update_bits’? [-Werror=implicit-function-declaration]
  607 |  snd_soc_update_bits(codec, ES8316_ADC_PDN_LINSEL_REG22, 0xc0,0x00);
      |  ^~~~~~~~~~~~~~~~~~~
      |  snd_ac97_update_bits
/xbkp/es8316/sound/soc/codecs/es8316.c: In function ‘es8316_pcm_hw_params’:
/xbkp/es8316/sound/soc/codecs/es8316.c:625:35: error: ‘struct snd_soc_pcm_runtime’ has no member named ‘codec’
  625 |  struct snd_soc_codec *codec = rtd->codec;
      |                                   ^~
/xbkp/es8316/sound/soc/codecs/es8316.c:626:31: warning: initialization of ‘struct es8316_priv *’ from ‘int’ makes pointer from integer without a cast [-Wint-conversion]
  626 |  struct es8316_priv *es8316 = snd_soc_codec_get_drvdata(codec);
      |                               ^~~~~~~~~~~~~~~~~~~~~~~~~
In file included from ./include/linux/acpi.h:15,
                 from ./include/linux/i2c.h:13,
                 from /xbkp/es8316/sound/soc/codecs/es8316.c:16:
/xbkp/es8316/sound/soc/codecs/es8316.c:636:16: error: dereferencing pointer to incomplete type ‘struct snd_soc_codec’
  636 |   dev_err(codec->dev, "No MCLK configured\n");
      |                ^~
./include/linux/device.h:1499:11: note: in definition of macro ‘dev_err’
 1499 |  _dev_err(dev, dev_fmt(fmt), ##__VA_ARGS__)
      |           ^~~
/xbkp/es8316/sound/soc/codecs/es8316.c: In function ‘es8316_mute’:
/xbkp/es8316/sound/soc/codecs/es8316.c:679:35: error: ‘struct snd_soc_dai’ has no member named ‘codec’
  679 |  struct snd_soc_codec *codec = dai->codec;
      |                                   ^~
/xbkp/es8316/sound/soc/codecs/es8316.c: At top level:
/xbkp/es8316/sound/soc/codecs/es8316.c:689:41: warning: ‘struct snd_soc_codec’ declared inside parameter list will not be visible outside of this definition or declaration
  689 | static int es8316_set_bias_level(struct snd_soc_codec *codec,
      |                                         ^~~~~~~~~~~~~
In file included from ./include/linux/printk.h:332,
                 from ./include/linux/kernel.h:15,
                 from ./include/linux/list.h:9,
                 from ./include/linux/module.h:9,
                 from /xbkp/es8316/sound/soc/codecs/es8316.c:13:
/xbkp/es8316/sound/soc/codecs/es8316.c: In function ‘es8316_set_bias_level’:
/xbkp/es8316/sound/soc/codecs/es8316.c:694:16: error: dereferencing pointer to incomplete type ‘struct snd_soc_codec’
  694 |   dev_dbg(codec->dev, "%s on\n", __func__);
      |                ^~
./include/linux/dynamic_debug.h:125:15: note: in definition of macro ‘__dynamic_func_call’
  125 |   func(&id, ##__VA_ARGS__);  \
      |               ^~~~~~~~~~~
./include/linux/dynamic_debug.h:157:2: note: in expansion of macro ‘_dynamic_func_call’
  157 |  _dynamic_func_call(fmt,__dynamic_dev_dbg,   \
      |  ^~~~~~~~~~~~~~~~~~
./include/linux/device.h:1509:2: note: in expansion of macro ‘dynamic_dev_dbg’
 1509 |  dynamic_dev_dbg(dev, dev_fmt(fmt), ##__VA_ARGS__)
      |  ^~~~~~~~~~~~~~~
/xbkp/es8316/sound/soc/codecs/es8316.c:694:3: note: in expansion of macro ‘dev_dbg’
  694 |   dev_dbg(codec->dev, "%s on\n", __func__);
      |   ^~~~~~~
/xbkp/es8316/sound/soc/codecs/es8316.c: At top level:
/xbkp/es8316/sound/soc/codecs/es8316.c:757:36: warning: ‘struct snd_soc_codec’ declared inside parameter list will not be visible outside of this definition or declaration
  757 | static int es8316_init_regs(struct snd_soc_codec *codec)
      |                                    ^~~~~~~~~~~~~
In file included from ./include/linux/printk.h:332,
                 from ./include/linux/kernel.h:15,
                 from ./include/linux/list.h:9,
                 from ./include/linux/module.h:9,
                 from /xbkp/es8316/sound/soc/codecs/es8316.c:13:
/xbkp/es8316/sound/soc/codecs/es8316.c: In function ‘es8316_init_regs’:
/xbkp/es8316/sound/soc/codecs/es8316.c:759:15: error: dereferencing pointer to incomplete type ‘struct snd_soc_codec’
  759 |  dev_dbg(codec->dev, "%s\n", __func__);
      |               ^~
./include/linux/dynamic_debug.h:125:15: note: in definition of macro ‘__dynamic_func_call’
  125 |   func(&id, ##__VA_ARGS__);  \
      |               ^~~~~~~~~~~
./include/linux/dynamic_debug.h:157:2: note: in expansion of macro ‘_dynamic_func_call’
  157 |  _dynamic_func_call(fmt,__dynamic_dev_dbg,   \
      |  ^~~~~~~~~~~~~~~~~~
./include/linux/device.h:1509:2: note: in expansion of macro ‘dynamic_dev_dbg’
 1509 |  dynamic_dev_dbg(dev, dev_fmt(fmt), ##__VA_ARGS__)
      |  ^~~~~~~~~~~~~~~
/xbkp/es8316/sound/soc/codecs/es8316.c:759:2: note: in expansion of macro ‘dev_dbg’
  759 |  dev_dbg(codec->dev, "%s\n", __func__);
      |  ^~~~~~~
/xbkp/es8316/sound/soc/codecs/es8316.c: At top level:
/xbkp/es8316/sound/soc/codecs/es8316.c:824:32: warning: ‘struct snd_soc_codec’ declared inside parameter list will not be visible outside of this definition or declaration
  824 | static int es8316_probe(struct snd_soc_codec *codec)
      |                                ^~~~~~~~~~~~~
/xbkp/es8316/sound/soc/codecs/es8316.c: In function ‘es8316_probe’:
/xbkp/es8316/sound/soc/codecs/es8316.c:827:19: error: passing argument 1 of ‘es8316_init_regs’ from incompatible pointer type [-Werror=incompatible-pointer-types]
  827 |  es8316_init_regs(codec);
      |                   ^~~~~
      |                   |
      |                   struct snd_soc_codec *
/xbkp/es8316/sound/soc/codecs/es8316.c:757:51: note: expected ‘struct snd_soc_codec *’ but argument is of type ‘struct snd_soc_codec *’
  757 | static int es8316_init_regs(struct snd_soc_codec *codec)
      |                             ~~~~~~~~~~~~~~~~~~~~~~^~~~~
/xbkp/es8316/sound/soc/codecs/es8316.c: At top level:
/xbkp/es8316/sound/soc/codecs/es8316.c:831:33: warning: ‘struct snd_soc_codec’ declared inside parameter list will not be visible outside of this definition or declaration
  831 | static int es8316_remove(struct snd_soc_codec *codec)
      |                                 ^~~~~~~~~~~~~
/xbkp/es8316/sound/soc/codecs/es8316.c: In function ‘es8316_remove’:
/xbkp/es8316/sound/soc/codecs/es8316.c:833:24: error: passing argument 1 of ‘es8316_set_bias_level’ from incompatible pointer type [-Werror=incompatible-pointer-types]
  833 |  es8316_set_bias_level(codec, SND_SOC_BIAS_OFF);
      |                        ^~~~~
      |                        |
      |                        struct snd_soc_codec *
/xbkp/es8316/sound/soc/codecs/es8316.c:689:56: note: expected ‘struct snd_soc_codec *’ but argument is of type ‘struct snd_soc_codec *’
  689 | static int es8316_set_bias_level(struct snd_soc_codec *codec,
      |                                  ~~~~~~~~~~~~~~~~~~~~~~^~~~~
/xbkp/es8316/sound/soc/codecs/es8316.c: At top level:
/xbkp/es8316/sound/soc/codecs/es8316.c:837:15: error: variable ‘soc_codec_dev_es8316’ has initializer but incomplete type
  837 | static struct snd_soc_codec_driver soc_codec_dev_es8316 = {
      |               ^~~~~~~~~~~~~~~~~~~~
/xbkp/es8316/sound/soc/codecs/es8316.c:838:3: error: ‘struct snd_soc_codec_driver’ has no member named ‘probe’
  838 |  .probe = es8316_probe,
      |   ^~~~~
/xbkp/es8316/sound/soc/codecs/es8316.c:838:11: warning: excess elements in struct initializer
  838 |  .probe = es8316_probe,
      |           ^~~~~~~~~~~~
/xbkp/es8316/sound/soc/codecs/es8316.c:838:11: note: (near initialization for ‘soc_codec_dev_es8316’)
/xbkp/es8316/sound/soc/codecs/es8316.c:839:3: error: ‘struct snd_soc_codec_driver’ has no member named ‘remove’
  839 |  .remove = es8316_remove,
      |   ^~~~~~
/xbkp/es8316/sound/soc/codecs/es8316.c:839:12: warning: excess elements in struct initializer
  839 |  .remove = es8316_remove,
      |            ^~~~~~~~~~~~~
/xbkp/es8316/sound/soc/codecs/es8316.c:839:12: note: (near initialization for ‘soc_codec_dev_es8316’)
/xbkp/es8316/sound/soc/codecs/es8316.c:840:3: error: ‘struct snd_soc_codec_driver’ has no member named ‘set_bias_level’
  840 |  .set_bias_level = es8316_set_bias_level,
      |   ^~~~~~~~~~~~~~
/xbkp/es8316/sound/soc/codecs/es8316.c:840:20: warning: excess elements in struct initializer
  840 |  .set_bias_level = es8316_set_bias_level,
      |                    ^~~~~~~~~~~~~~~~~~~~~
/xbkp/es8316/sound/soc/codecs/es8316.c:840:20: note: (near initialization for ‘soc_codec_dev_es8316’)
/xbkp/es8316/sound/soc/codecs/es8316.c:841:3: error: ‘struct snd_soc_codec_driver’ has no member named ‘idle_bias_off’
  841 |  .idle_bias_off = true,
      |   ^~~~~~~~~~~~~
/xbkp/es8316/sound/soc/codecs/es8316.c:841:19: warning: excess elements in struct initializer
  841 |  .idle_bias_off = true,
      |                   ^~~~
/xbkp/es8316/sound/soc/codecs/es8316.c:841:19: note: (near initialization for ‘soc_codec_dev_es8316’)
/xbkp/es8316/sound/soc/codecs/es8316.c:843:3: error: ‘struct snd_soc_codec_driver’ has no member named ‘component_driver’
  843 |  .component_driver = {
      |   ^~~~~~~~~~~~~~~~
/xbkp/es8316/sound/soc/codecs/es8316.c:843:22: error: extra brace group at end of initializer
  843 |  .component_driver = {
      |                      ^
/xbkp/es8316/sound/soc/codecs/es8316.c:843:22: note: (near initialization for ‘soc_codec_dev_es8316’)
/xbkp/es8316/sound/soc/codecs/es8316.c:843:22: warning: excess elements in struct initializer
/xbkp/es8316/sound/soc/codecs/es8316.c:843:22: note: (near initialization for ‘soc_codec_dev_es8316’)
/xbkp/es8316/sound/soc/codecs/es8316.c: In function ‘es8316_i2c_probe’:
/xbkp/es8316/sound/soc/codecs/es8316.c:876:9: error: implicit declaration of function ‘snd_soc_register_codec’; did you mean ‘snd_soc_register_dai’? [-Werror=implicit-function-declaration]
  876 |  return snd_soc_register_codec(&i2c_client->dev, &soc_codec_dev_es8316,
      |         ^~~~~~~~~~~~~~~~~~~~~~
      |         snd_soc_register_dai
/xbkp/es8316/sound/soc/codecs/es8316.c: In function ‘es8316_i2c_remove’:
/xbkp/es8316/sound/soc/codecs/es8316.c:882:2: error: implicit declaration of function ‘snd_soc_unregister_codec’; did you mean ‘snd_soc_unregister_card’? [-Werror=implicit-function-declaration]
  882 |  snd_soc_unregister_codec(&client->dev);
      |  ^~~~~~~~~~~~~~~~~~~~~~~~
      |  snd_soc_unregister_card
/xbkp/es8316/sound/soc/codecs/es8316.c: At top level:
/xbkp/es8316/sound/soc/codecs/es8316.c:837:36: error: storage size of ‘soc_codec_dev_es8316’ isn’t known
  837 | static struct snd_soc_codec_driver soc_codec_dev_es8316 = {
      |                                    ^~~~~~~~~~~~~~~~~~~~
/xbkp/es8316/sound/soc/codecs/es8316.c:50:12: warning: ‘es8316_reset’ defined but not used [-Wunused-function]
   50 | static int es8316_reset(struct snd_soc_codec *codec)
      |            ^~~~~~~~~~~~
cc1: some warnings being treated as errors
make[1]: *** [scripts/Makefile.build:281: /xbkp/es8316/sound/soc/codecs/es8316.o] Error 1
make: *** [Makefile:1624: _module_/xbkp/es8316/sound/soc/codecs] Error 2
make: Leaving directory '/usr/lib/modules/5.3.4-arch1-1-ARCH/build'
[x@archlinux boards] $ pwd
/xbkp/es8316/sound/soc/intel/boards
[x@archlinux boards] $ make -C /lib/modules/`uname -r`/build M=`pwd` modules
make: Entering directory '/usr/lib/modules/5.3.4-arch1-1-ARCH/build'
  CC [M]  /xbkp/es8316/sound/soc/intel/boards/bytcht_es8316.o
/xbkp/es8316/sound/soc/intel/boards/bytcht_es8316.c:226:4: error: ‘struct snd_soc_dai_link’ has no member named ‘cpu_dai_name’
  226 |   .cpu_dai_name = "media-cpu-dai",
      |    ^~~~~~~~~~~~
/xbkp/es8316/sound/soc/intel/boards/bytcht_es8316.c:226:19: error: initialization of ‘struct snd_soc_dai_link_component *’ from incompatible pointer type ‘char *’ [-Werror=incompatible-pointer-types]
  226 |   .cpu_dai_name = "media-cpu-dai",
      |                   ^~~~~~~~~~~~~~~
/xbkp/es8316/sound/soc/intel/boards/bytcht_es8316.c:226:19: note: (near initialization for ‘byt_cht_es8316_dais[0].cpus’)
/xbkp/es8316/sound/soc/intel/boards/bytcht_es8316.c:227:4: error: ‘struct snd_soc_dai_link’ has no member named ‘codec_dai_name’
  227 |   .codec_dai_name = "snd-soc-dummy-dai",
      |    ^~~~~~~~~~~~~~
/xbkp/es8316/sound/soc/intel/boards/bytcht_es8316.c:227:21: warning: initialization of ‘unsigned int’ from ‘char *’ makes integer from pointer without a cast [-Wint-conversion]
  227 |   .codec_dai_name = "snd-soc-dummy-dai",
      |                     ^~~~~~~~~~~~~~~~~~~
/xbkp/es8316/sound/soc/intel/boards/bytcht_es8316.c:227:21: note: (near initialization for ‘byt_cht_es8316_dais[0].num_cpus’)
/xbkp/es8316/sound/soc/intel/boards/bytcht_es8316.c:227:21: error: initializer element is not computable at load time
/xbkp/es8316/sound/soc/intel/boards/bytcht_es8316.c:227:21: note: (near initialization for ‘byt_cht_es8316_dais[0].num_cpus’)
/xbkp/es8316/sound/soc/intel/boards/bytcht_es8316.c:228:4: error: ‘struct snd_soc_dai_link’ has no member named ‘codec_name’
  228 |   .codec_name = "snd-soc-dummy",
      |    ^~~~~~~~~~
/xbkp/es8316/sound/soc/intel/boards/bytcht_es8316.c:228:17: error: initialization of ‘struct snd_soc_dai_link_component *’ from incompatible pointer type ‘char *’ [-Werror=incompatible-pointer-types]
  228 |   .codec_name = "snd-soc-dummy",
      |                 ^~~~~~~~~~~~~~~
/xbkp/es8316/sound/soc/intel/boards/bytcht_es8316.c:228:17: note: (near initialization for ‘byt_cht_es8316_dais[0].codecs’)
/xbkp/es8316/sound/soc/intel/boards/bytcht_es8316.c:229:4: error: ‘struct snd_soc_dai_link’ has no member named ‘platform_name’; did you mean ‘platforms’?
  229 |   .platform_name = "sst-mfld-platform",
      |    ^~~~~~~~~~~~~
      |    platforms
/xbkp/es8316/sound/soc/intel/boards/bytcht_es8316.c:229:20: warning: initialization of ‘unsigned int’ from ‘char *’ makes integer from pointer without a cast [-Wint-conversion]
  229 |   .platform_name = "sst-mfld-platform",
      |                    ^~~~~~~~~~~~~~~~~~~
/xbkp/es8316/sound/soc/intel/boards/bytcht_es8316.c:229:20: note: (near initialization for ‘byt_cht_es8316_dais[0].num_codecs’)
/xbkp/es8316/sound/soc/intel/boards/bytcht_es8316.c:229:20: error: initializer element is not computable at load time
/xbkp/es8316/sound/soc/intel/boards/bytcht_es8316.c:229:20: note: (near initialization for ‘byt_cht_es8316_dais[0].num_codecs’)
/xbkp/es8316/sound/soc/intel/boards/bytcht_es8316.c:240:4: error: ‘struct snd_soc_dai_link’ has no member named ‘cpu_dai_name’
  240 |   .cpu_dai_name = "deepbuffer-cpu-dai",
      |    ^~~~~~~~~~~~
/xbkp/es8316/sound/soc/intel/boards/bytcht_es8316.c:240:19: error: initialization of ‘struct snd_soc_dai_link_component *’ from incompatible pointer type ‘char *’ [-Werror=incompatible-pointer-types]
  240 |   .cpu_dai_name = "deepbuffer-cpu-dai",
      |                   ^~~~~~~~~~~~~~~~~~~~
/xbkp/es8316/sound/soc/intel/boards/bytcht_es8316.c:240:19: note: (near initialization for ‘byt_cht_es8316_dais[1].cpus’)
/xbkp/es8316/sound/soc/intel/boards/bytcht_es8316.c:241:4: error: ‘struct snd_soc_dai_link’ has no member named ‘codec_dai_name’
  241 |   .codec_dai_name = "snd-soc-dummy-dai",
      |    ^~~~~~~~~~~~~~
/xbkp/es8316/sound/soc/intel/boards/bytcht_es8316.c:241:21: warning: initialization of ‘unsigned int’ from ‘char *’ makes integer from pointer without a cast [-Wint-conversion]
  241 |   .codec_dai_name = "snd-soc-dummy-dai",
      |                     ^~~~~~~~~~~~~~~~~~~
/xbkp/es8316/sound/soc/intel/boards/bytcht_es8316.c:241:21: note: (near initialization for ‘byt_cht_es8316_dais[1].num_cpus’)
/xbkp/es8316/sound/soc/intel/boards/bytcht_es8316.c:241:21: error: initializer element is not computable at load time
/xbkp/es8316/sound/soc/intel/boards/bytcht_es8316.c:241:21: note: (near initialization for ‘byt_cht_es8316_dais[1].num_cpus’)
/xbkp/es8316/sound/soc/intel/boards/bytcht_es8316.c:242:4: error: ‘struct snd_soc_dai_link’ has no member named ‘codec_name’
  242 |   .codec_name = "snd-soc-dummy",
      |    ^~~~~~~~~~
/xbkp/es8316/sound/soc/intel/boards/bytcht_es8316.c:242:17: error: initialization of ‘struct snd_soc_dai_link_component *’ from incompatible pointer type ‘char *’ [-Werror=incompatible-pointer-types]
  242 |   .codec_name = "snd-soc-dummy",
      |                 ^~~~~~~~~~~~~~~
/xbkp/es8316/sound/soc/intel/boards/bytcht_es8316.c:242:17: note: (near initialization for ‘byt_cht_es8316_dais[1].codecs’)
/xbkp/es8316/sound/soc/intel/boards/bytcht_es8316.c:243:4: error: ‘struct snd_soc_dai_link’ has no member named ‘platform_name’; did you mean ‘platforms’?
  243 |   .platform_name = "sst-mfld-platform",
      |    ^~~~~~~~~~~~~
      |    platforms
/xbkp/es8316/sound/soc/intel/boards/bytcht_es8316.c:243:20: warning: initialization of ‘unsigned int’ from ‘char *’ makes integer from p
ointer without a cast [-Wint-conversion]
  243 |   .platform_name = "sst-mfld-platform",
      |                    ^~~~~~~~~~~~~~~~~~~
/xbkp/es8316/sound/soc/intel/boards/bytcht_es8316.c:243:20: note: (near initialization for ‘byt_cht_es8316_dais[1].num_codecs’)
/xbkp/es8316/sound/soc/intel/boards/bytcht_es8316.c:243:20: error: initializer element is not computable at load time
/xbkp/es8316/sound/soc/intel/boards/bytcht_es8316.c:243:20: note: (near initialization for ‘byt_cht_es8316_dais[1].num_codecs’)
/xbkp/es8316/sound/soc/intel/boards/bytcht_es8316.c:253:4: error: ‘struct snd_soc_dai_link’ has no member named ‘cpu_dai_name’
  253 |   .cpu_dai_name = "compress-cpu-dai",
      |    ^~~~~~~~~~~~
/xbkp/es8316/sound/soc/intel/boards/bytcht_es8316.c:253:19: error: initialization of ‘struct snd_soc_dai_link_component *’ from incompatible pointer type ‘char *’ [-Werror=incompatible-pointer-types]
  253 |   .cpu_dai_name = "compress-cpu-dai",
      |                   ^~~~~~~~~~~~~~~~~~
/xbkp/es8316/sound/soc/intel/boards/bytcht_es8316.c:253:19: note: (near initialization for ‘byt_cht_es8316_dais[2].cpus’)
/xbkp/es8316/sound/soc/intel/boards/bytcht_es8316.c:254:4: error: ‘struct snd_soc_dai_link’ has no member named ‘codec_dai_name’
  254 |   .codec_dai_name = "snd-soc-dummy-dai",
      |    ^~~~~~~~~~~~~~
/xbkp/es8316/sound/soc/intel/boards/bytcht_es8316.c:254:21: warning: initialization of ‘unsigned int’ from ‘char *’ makes integer from pointer without a cast [-Wint-conversion]
  254 |   .codec_dai_name = "snd-soc-dummy-dai",
      |                     ^~~~~~~~~~~~~~~~~~~
/xbkp/es8316/sound/soc/intel/boards/bytcht_es8316.c:254:21: note: (near initialization for ‘byt_cht_es8316_dais[2].num_cpus’)
/xbkp/es8316/sound/soc/intel/boards/bytcht_es8316.c:254:21: error: initializer element is not computable at load time
/xbkp/es8316/sound/soc/intel/boards/bytcht_es8316.c:254:21: note: (near initialization for ‘byt_cht_es8316_dais[2].num_cpus’)
/xbkp/es8316/sound/soc/intel/boards/bytcht_es8316.c:255:4: error: ‘struct snd_soc_dai_link’ has no member named ‘codec_name’
  255 |   .codec_name = "snd-soc-dummy",
      |    ^~~~~~~~~~
/xbkp/es8316/sound/soc/intel/boards/bytcht_es8316.c:255:17: error: initialization of ‘struct snd_soc_dai_link_component *’ from incompatible pointer type ‘char *’ [-Werror=incompatible-pointer-types]
  255 |   .codec_name = "snd-soc-dummy",
      |                 ^~~~~~~~~~~~~~~
/xbkp/es8316/sound/soc/intel/boards/bytcht_es8316.c:255:17: note: (near initialization for ‘byt_cht_es8316_dais[2].codecs’)
/xbkp/es8316/sound/soc/intel/boards/bytcht_es8316.c:256:4: error: ‘struct snd_soc_dai_link’ has no member named ‘platform_name’; did you mean ‘platforms’?
  256 |   .platform_name = "sst-mfld-platform",
      |    ^~~~~~~~~~~~~
      |    platforms
/xbkp/es8316/sound/soc/intel/boards/bytcht_es8316.c:256:20: warning: initialization of ‘unsigned int’ from ‘char *’ makes integer from pointer without a cast [-Wint-conversion]
  256 |   .platform_name = "sst-mfld-platform",
      |                    ^~~~~~~~~~~~~~~~~~~
/xbkp/es8316/sound/soc/intel/boards/bytcht_es8316.c:256:20: note: (near initialization for ‘byt_cht_es8316_dais[2].num_codecs’)
/xbkp/es8316/sound/soc/intel/boards/bytcht_es8316.c:256:20: error: initializer element is not computable at load time
/xbkp/es8316/sound/soc/intel/boards/bytcht_es8316.c:256:20: note: (near initialization for ‘byt_cht_es8316_dais[2].num_codecs’)
/xbkp/es8316/sound/soc/intel/boards/bytcht_es8316.c:263:4: error: ‘struct snd_soc_dai_link’ has no member named ‘cpu_dai_name’
  263 |   .cpu_dai_name = "ssp2-port",
      |    ^~~~~~~~~~~~
/xbkp/es8316/sound/soc/intel/boards/bytcht_es8316.c:263:19: error: initialization of ‘const struct snd_soc_pcm_stream *’ from incompatible pointer type ‘char *’ [-Werror=incompatible-pointer-types]
  263 |   .cpu_dai_name = "ssp2-port",
      |                   ^~~~~~~~~~~
/xbkp/es8316/sound/soc/intel/boards/bytcht_es8316.c:263:19: note: (near initialization for ‘byt_cht_es8316_dais[3].params’)
/xbkp/es8316/sound/soc/intel/boards/bytcht_es8316.c:264:4: error: ‘struct snd_soc_dai_link’ has no member named ‘platform_name’; did you mean ‘platforms’?
  264 |   .platform_name = "sst-mfld-platform",
      |    ^~~~~~~~~~~~~
      |    platforms
/xbkp/es8316/sound/soc/intel/boards/bytcht_es8316.c:264:20: warning: initialization of ‘unsigned int’ from ‘char *’ makes integer from pointer without a cast [-Wint-conversion]
  264 |   .platform_name = "sst-mfld-platform",
      |                    ^~~~~~~~~~~~~~~~~~~
/xbkp/es8316/sound/soc/intel/boards/bytcht_es8316.c:264:20: note: (near initialization for ‘byt_cht_es8316_dais[3].num_params’)
/xbkp/es8316/sound/soc/intel/boards/bytcht_es8316.c:264:20: error: initializer element is not computable at load time
/xbkp/es8316/sound/soc/intel/boards/bytcht_es8316.c:264:20: note: (near initialization for ‘byt_cht_es8316_dais[3].num_params’)
/xbkp/es8316/sound/soc/intel/boards/bytcht_es8316.c:266:4: error: ‘struct snd_soc_dai_link’ has no member named ‘codec_dai_name’
  266 |   .codec_dai_name = "ES8316 HiFi",
      |    ^~~~~~~~~~~~~~
/xbkp/es8316/sound/soc/intel/boards/bytcht_es8316.c:266:21: warning: initialization of ‘unsigned char:1’ from ‘char *’ makes integer from pointer without a cast [-Wint-conversion]
  266 |   .codec_dai_name = "ES8316 HiFi",
      |                     ^~~~~~~~~~~~~
/xbkp/es8316/sound/soc/intel/boards/bytcht_es8316.c:266:21: note: (near initialization for ‘byt_cht_es8316_dais[3].dynamic’)
/xbkp/es8316/sound/soc/intel/boards/bytcht_es8316.c:266:21: error: initializer element is not computable at load time
/xbkp/es8316/sound/soc/intel/boards/bytcht_es8316.c:266:21: note: (near initialization for ‘byt_cht_es8316_dais[3].dynamic’)
/xbkp/es8316/sound/soc/intel/boards/bytcht_es8316.c:267:4: error: ‘struct snd_soc_dai_link’ has no member named ‘codec_name’
  267 |   .codec_name = "i2c-ESSX8316:00",
      |    ^~~~~~~~~~
/xbkp/es8316/sound/soc/intel/boards/bytcht_es8316.c:267:17: warning: initialization of ‘unsigned char:1’ from ‘char *’ makes integer from pointer without a cast [-Wint-conversion]
  267 |   .codec_name = "i2c-ESSX8316:00",
      |                 ^~~~~~~~~~~~~~~~~
/xbkp/es8316/sound/soc/intel/boards/bytcht_es8316.c:267:17: note: (near initialization for ‘byt_cht_es8316_dais[3].dpcm_capture’)
/xbkp/es8316/sound/soc/intel/boards/bytcht_es8316.c:267:17: error: initializer element is not computable at load time
/xbkp/es8316/sound/soc/intel/boards/bytcht_es8316.c:267:17: note: (near initialization for ‘byt_cht_es8316_dais[3].dpcm_capture’)
cc1: some warnings being treated as errors
make[1]: *** [scripts/Makefile.build:281: /xbkp/es8316/sound/soc/intel/boards/bytcht_es8316.o] Error 1
make: *** [Makefile:1624: _module_/xbkp/es8316/sound/soc/intel/boards] Error 2
make: Leaving directory '/usr/lib/modules/5.3.4-arch1-1-ARCH/build'
[x@archlinux boards] $ pwd
/xbkp/es8316/sound/soc/intel/atom/sst
[x@archlinux boards] $ make -C /lib/modules/`uname -r`/build M=`pwd` modules
make: Entering directory '/usr/lib/modules/5.3.4-arch1-1-ARCH/build'
  CC [M]  /xbkp/es8316/sound/soc/intel/atom/sst/sst_acpi.o
In file included from /xbkp/es8316/sound/soc/intel/atom/sst/sst_acpi.c:44:
/xbkp/es8316/sound/soc/intel/atom/sst/../sst-mfld-platform.h:158:33: warning: ‘struct snd_soc_platform’ declared inside parameter list will not be visible outside of this definition or declaration
  158 | int sst_dsp_init_v2_dpcm(struct snd_soc_platform *platform);
      |                                 ^~~~~~~~~~~~~~~~
  LD [M]  /xbkp/es8316/sound/soc/intel/atom/sst/snd-intel-sst-acpi.o
  Building modules, stage 2.
  MODPOST 1 modules
ERROR: "sst_acpi_find_machine" [/xbkp/es8316/sound/soc/intel/atom/sst/snd-intel-sst-acpi.ko] undefined!
make[1]: *** [scripts/Makefile.modpost:103: modules-modpost] Error 1
make: *** [Makefile:1628: modules] Error 2
make: Leaving directory '/usr/lib/modules/5.3.4-arch1-1-ARCH/build'

Can somebody who understands this better explain to me what I'm doing wrong here?

Thank you very much,
xenobro.

Offline

#2 2019-10-08 00:47:21

xenobro
Member
Registered: 2019-05-25
Posts: 14

Re: es8316 issues on Positivo Q432A

Also, I've filed this bug on Bugzilla and this one on the ALSA project, though I have to correct my description of what happens with only alsa-lib and alsa-utils and have had no responses - I wonder if adding a step by step to reproduce the issues would help me get any replies...
Anyway, here's my aplay -lL (post-pulseaudio):

null
    Discard all samples (playback) or generate zero samples (capture)
jack
    JACK Audio Connection Kit
pulse
    PulseAudio Sound Server
default
    Default ALSA Output (currently PulseAudio Sound Server)
sysdefault:CARD=bytchtes8316
    bytcht-es8316, 
    Default Audio Device
usbstream:CARD=bytchtes8316
    bytcht-es8316
    USB Stream Output
**** List of PLAYBACK Hardware Devices ****
card 0: bytchtes8316 [bytcht-es8316], device 0: 3 []
  Subdevices: 1/1
  Subdevice #0: subdevice #0
card 0: bytchtes8316 [bytcht-es8316], device 1: Deep-Buffer Audio (*) []
  Subdevices: 1/1
  Subdevice #0: subdevice #0

And here's my alsa-info (post-pulseaudio):
http://alsa-project.org/db/?f=d9dd625d3 … 3ab1730957

Thank you once again,
xenobro

Offline

Board footer

Powered by FluxBB