Commit graph

244 commits

Author SHA1 Message Date
turmary
7461921407 Add: clear title for each install/uninstall steps 2020-09-29 00:20:38 +08:00
turmary
f1a46d63cc Add: service message direct to standard output and also /var/log/seeed-voicecard.log 2020-09-28 08:44:56 +01:00
Andre Marschalek
84247b0037 Update seeed-voicecard to avoid systemd error messages because of failed service start
systemctl restart seeed-voicecard.service
Job for seeed-voicecard.service failed because the control process exited with error code.
See "systemctl status seeed-voicecard.service" and "journalctl -xe" for details.
2020-09-27 11:16:06 +01:00
turmary
2baddde5ba Fix: install ubuntu kernel only if debian kernel install failed 2020-09-27 11:03:03 +01:00
turmary
b5def1af8e Add: script option --keep-kernel to not change current kernel 2020-09-27 11:01:51 +01:00
turmary
0abc6ed072 Add: checking current directory when installing 2020-09-27 11:00:37 +01:00
turmary
30216a9c7c Add: probing kernel postfix automatically for dkms 2020-09-27 09:15:41 +01:00
turmary
6af23967a5 Add: prevent install package again in download_install_debpkg() 2020-09-27 09:14:54 +01:00
turmary
74620fbdbf Remove: useless dd message in get_kernel_version() 2020-09-27 09:13:55 +01:00
turmary
4cec9e73df Fix: probing architecture when installing specific package 2020-09-27 09:12:35 +01:00
turmary
957b1298d5 Add: more convenience error message about /boot free space 2020-09-27 08:09:25 +01:00
KillingJacky
901b451bd5 add an cmd line option for choosing compile with compatible kernel; clean up more when uninstalling 2020-09-27 06:49:19 +01:00
Psycho
b83519eb82 English correction 2020-09-27 06:49:19 +01:00
turmary
1372794704 Revert "Don't force kernel downgrade"
This reverts commit 30276c80bc.
2020-09-27 05:09:34 +01:00
Hin-Tak Leung
19cfed5bd7 Adding missing shebang
This script has no bash-ism, so /bin/sh (dash on Debian/Ubuntu) is fine.
2020-09-27 05:09:34 +01:00
Hin-Tak Leung
6875869cb2 emit warning for calling ac108_set_sysclk() with unexpected arguments
Don't know why Seeed Studio staff did not put it in.

Conflicts:
	ac108.c
2020-09-27 05:09:34 +01:00
Hin-Tak Leung
9285159a7d Apparently, snd_soc_dai_set_bclk_ratio should be used where snd_soc_dai_set_tdm_slot is.
See, for example,

commit b78b30e32a19f1ac79c26e0a3e9f7bc7385a02a2
Author: j-schambacher <joerg@i2audio.com>
Date:   Tue May 19 13:56:17 2020 +0200

    Switch to snd_soc_dai_set_bclk_ratio
    Replaces obsolete function snd_soc_dai_set_tdm_slot
2020-09-27 05:09:34 +01:00
Hin-Tak Leung
90144a2f2e updating for Ubuntu location of dkms-generated kernel modules 2020-09-27 05:09:34 +01:00
Hin-Tak Leung
cbd6da78fc updating non-standard PATH for Ubuntu in uninstall.sh 2020-09-27 05:09:34 +01:00
Hin-Tak Leung
cf98b67079 rebuilt dtbo on current Raspbian 2020-09-27 05:09:34 +01:00
Hin-Tak Leung
c4c112dcaf relocating fixed-clock entry, based on upstream advice
See upstream -
https://github.com/raspberrypi/documentation/issues/1671
https://github.com/raspberrypi/documentation/pull/1673

Quoted here:

* Only Device Tree nodes at the top level of the tree and children of
  a bus node will be probed. For nodes added at run-time there is the
  further limitation that the bus must register for notifications of
  the addition and removal of children. However, there are exceptions
  that break this rule and cause confusion: the kernel explicitly
  scans the entire tree for some device types - clocks and interrupt
  controller being the two main ones - in order to (for clocks)
  initialise them early and/or (for interrupt controllers) in a
  particular order. This search mechanism only happens during booting
  and so doesn't work for nodes added by an overlay at run-time. It is
  therefore recommended for overlays to place fixed-clock nodes in the
  root of the tree unless it is guaranteed that the overlay will not
  be used at run-time.
2020-09-27 05:09:34 +01:00
Hin-Tak Leung
9722cb01e4 Revert "temporary work-around for not being able to read sysclk from dts for ac10x"
This reverts commit 138d22226e.
2020-09-27 05:09:34 +01:00
Hin-Tak Leung
f4f303f9bd Use pr_warn() for recoverable errors, not pr_info() 2020-09-27 05:09:34 +01:00
Hin-Tak Leung
de23c61210 Use pr_info() for just routine information, not pr_warn() 2020-09-27 05:09:34 +01:00
Hin-Tak Leung
cca7bbfe2a comment about Raspberry Pi 4 having two HDMI ports
The if-endif block below around the amixer call fixes
https://github.com/respeaker/seeed-voicecard/issues/239
https://github.com/respeaker/seeed-voicecard/issues/240
https://github.com/respeaker/seeed-voicecard/issues/243
2020-09-27 05:09:34 +01:00
Hin-Tak Leung
5ca9ab45df Use logic from raspi-config to determine if bcm2835 routing option exists or not
The snd_bcm2835.enable_compat_alsa option:

    enable_compat_alsa:Enables ALSA compatibility virtual audio device (bool)

is off these days, since the beginning of 2020 apparently.

Reference:

    raspi-config (20200120) buster; urgency=medium

      * Add audio switching for discrete internal ALSA devices

     -- Simon Long <simon@raspberrypi.org>  Mon, 20 Jan 2020 11:38:37 +0000
2020-09-27 05:09:34 +01:00
Hin-Tak Leung
8c25d81890 update check_kernel_headers() for Ubuntu header packages 2020-09-27 05:09:34 +01:00
Hin-Tak Leung
f47375e54d Add reference to Ubuntu kernel package names
Signed-off-by: Hin-Tak Leung <htl10@users.sourceforge.net>
2020-09-27 05:09:34 +01:00
Hin-Tak Leung
1f7323417b temporary work-around for not being able to read sysclk from dts for ac10x
The "sysclk = 24000000" value is supposed to come from the "clock-frequency"
field of ac108_mclk / ac10x_mclk, but somehow it isn't on 5.4 (vs 4.19). This
is a temporary work-around. For some strange unknown reasons, this affects
only the square 4-mic device, but not the linear 4-mic nor the 6-mics device.
The other two devices have two ac108's, and seem to work fine without it.

In v4.19:
seeed_voice_card_probe [snd_soc_seeed_voicecard]
 -> devm_snd_soc_register_card [snd_soc_core]
 -> snd_soc_register_card [snd_soc_core]
 -> seeed_voice_card_dai_init [snd_soc_seeed_voicecard]
 -> asoc_simple_card_init_dai [snd_soc_simple_card_utils]
 -> snd_soc_dai_set_sysclk [snd_soc_core]
 -> ac108_set_sysclk [snd_soc_ac108]

In 5.4:
seeed_voice_card_probe [snd_soc_seeed_voicecard]
 -> devm_snd_soc_register_card [snd_soc_core]
 -> snd_soc_register_card [snd_soc_core]
 -> snd_soc_instantiate_card [snd_soc_core]
 -> seeed_voice_card_dai_init [snd_soc_seeed_voicecard]
 -> asoc_simple_init_dai.part.0 [snd_soc_seeed_voicecard]
 -> snd_soc_dai_set_sysclk [snd_soc_core]
 -> ac108_set_sysclk [snd_soc_ac108]

Which results in the "ac108_set_sysclk  :24000000" kernel message.

Note the extra snd_soc_instantiate_card(), and the copied/renamed
asoc_simple_init_dai() - it became static and not-available to other drivers
in v5.x.

See https://github.com/respeaker/seeed-voicecard/issues/246
2020-09-27 05:09:34 +01:00
Hin-Tak Leung
e82e6fde67 make the config un-install directory configurable, for Ubuntu 2020-09-27 05:09:34 +01:00
Hin-Tak Leung
cd899a83d5 make the overlay un-install directory configurable, for Ubuntu 2020-09-27 05:09:34 +01:00
Hin-Tak Leung
e750de0ecc Allow kernel images to be elsewhere - Ubuntu kernel is not at Raspbian location 2020-09-27 05:09:34 +01:00
Hin-Tak Leung
88aae48c41 adding new ubuntu-prerequisite.sh script
notes and typo
2020-08-23 20:37:52 +01:00
Hin-Tak Leung
6bcd4cad2f /opt/vc/bin is not on standard $PATH on Ubuntu 2020-08-23 20:37:20 +01:00
Hin-Tak Leung
7f88e11fd0 adding advice to run ./ubuntu-prerequisite.sh in install.sh 2020-08-23 20:37:07 +01:00
Hin-Tak Leung
60e90d6fae Ubuntu kernels is not at /boot/kernel.img. Revisit for Raspbian
check running kernel agree with installed kernel, and ask the user to reboot before continue

Ubuntu kernels are not installed at /boot/kernel.img
2020-08-23 20:35:44 +01:00
Hin-Tak Leung
5cefec4cca make the config file configurable, for Ubuntu 2020-08-23 20:34:32 +01:00
Hin-Tak Leung
1f9c1464ab make the overlay install directory configurable, for Ubuntu 2020-08-23 20:34:25 +01:00
Hin-Tak Leung
71f01070d8 spelling 2020-08-21 16:27:08 +01:00
Hin-Tak Leung
07dc49259a remove "-c 1" and also protect with test for older kernel / alsa
The "-c 1" was simply wrong. The default (-c 0) sound device of
older kernel / alsa has a numid=3 selector for auto vs headphone vs hdmi .
Newer kernel simply has multiple devices. Also, headphone is -c 0 .

$ amixer contents
numid=2,iface=MIXER,name='Headphone Playback Switch'
  ; type=BOOLEAN,access=rw------,values=1
  : values=on
numid=1,iface=MIXER,name='Headphone Playback Volume'
  ; type=INTEGER,access=rw---R--,values=1,min=-10239,max=400,step=0
  : values=-2000
  | dBscale-min=-102.39dB,step=0.01dB,mute=1

TODO: For now, broadly dividing by kernel v4.x vs v5.x is good enough, but
it would be nice to find out when / which kernel /alsa this is relevant.

closes https://github.com/respeaker/seeed-voicecard/issues/240
2020-08-18 23:30:21 +01:00
Hin-Tak Leung
d8775ccb93 Use pr_info() for regular information 2020-08-18 08:22:32 +01:00
Hin-Tak Leung
c3ddbb521d likely v5 kernels behave like late 4.x, regarding dynamic dtoverlay; untested, and possibly revisit. 2020-08-18 08:22:19 +01:00
Hin-Tak Leung
02eccbcd55 mask amixer failures - some user have different numbered / multiple audio devices 2020-08-09 10:06:21 +01:00
Hin-Tak Leung
2cc009619e Merge branch 'ubuntu' into v5.5 2020-08-05 06:10:37 +01:00
Hin-Tak Leung
aaf0cc2c61 move files in place, to capture hhuysqt <1020988872@qq.com>'s ubuntu-porting work
git rm seeed-voicecard.c
git mv seeed-voicecard-v5.3.c seeed-voicecard.c
2020-08-05 06:07:36 +01:00
Hin-Tak Leung
a6db04e724 Merge branch 'wrong-initialization-fix' into v5.5
Conflicts:
	seeed-voicecard.c
2020-08-05 05:59:37 +01:00
Hin-Tak Leung
0be1de9750 Revert previous over-zealous "rename asoc_simple_card_xxx() to asoc_simple_()"
Two of them should not have been changed, as they were protected and intended
for older kernels.
2020-08-05 05:45:31 +01:00
Hin-Tak Leung
fcbc3b6d6b copy asoc_simple_card_init_dai() from v5.7:sound/soc/generic/simple-card-utils.c
It was made private in v5.2:

commit ad934ca8010843482d61fda46786449a9bc99e10
Author: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Date:   Wed Mar 20 13:55:52 2019 +0900

    ASoC: simple-card-utils: share asoc_simple_dai_init()
2020-08-05 05:45:31 +01:00
Hin-Tak Leung
c2b419c286 Revert "asoc_simple_card_init_dai is not exported, but asoc_simple_dai_init is, and does more"
This reverts commit de22f92298.

That commit was wrong: seeed_priv_to_props() is not identical to simple_priv_props().

Conflicts:
	seeed-voicecard.c
2020-08-05 05:45:31 +01:00
Hin-Tak Leung
ed094dece5 v5.2: comments
The init code was extracted into asoc_simple_card_init_priv(), with
additional comments.

commit 65a5056b21202eff7f54243e587183f4bb6ed352
Author: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Date:   Wed Mar 20 13:56:26 2019 +0900

    ASoC: simple-card-utils: share asoc_simple_card_init_priv()

    The difference between simple-card / audio-graph are just using
    OF graph style, or not. In other words, other things should be same.
    This means, simple-card/audio-graph common functions should be
    implemented at simple-card-utils, and its own functions should be
    implemented at each files.

    Current simple-card / audio-graph are initializing each priv,
    but it is same operation.
    This patch adds new asoc_simple_card_init_priv() and initialize
    priv by same operation.
2020-08-05 05:45:31 +01:00