Commit graph

323 commits

Author SHA1 Message Date
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
efaa210d79 Merge branch 'v5.7' into v5.8 2020-09-26 23:08:22 +01:00
Hin-Tak Leung
e6e5240922 Merge branch 'v5.5' into v5.7 2020-09-26 23:08:00 +01:00
Hin-Tak Leung
8ea751c4e9 Adding missing shebang
This script has no bash-ism, so /bin/sh (dash on Debian/Ubuntu) is fine.
2020-09-18 01:06:57 +01:00
Hin-Tak Leung
e2529f9eee Merge branch 'v5.7' into v5.8 2020-09-14 14:56:27 +01:00
Hin-Tak Leung
6aff6e0b33 Merge branch 'v5.5' into v5.7 2020-09-14 14:55:59 +01:00
Hin-Tak Leung
bb09e9d24b 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-14 14:49:22 +01:00
Hin-Tak Leung
edddb2fbe4 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-14 14:48:18 +01:00
Hin-Tak Leung
655d7fe57b updating for Ubuntu location of dkms-generated kernel modules 2020-09-14 14:47:08 +01:00
Hin-Tak Leung
d64e994982 updating non-standard PATH for Ubuntu in uninstall.sh 2020-09-14 14:46:45 +01:00
Hin-Tak Leung
673305fc4e rebuilt dtbo on current Raspbian 2020-09-14 14:46:10 +01:00
Hin-Tak Leung
47d97e7bd5 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-14 14:41:47 +01:00
Hin-Tak Leung
955707d944 Revert "temporary work-around for not being able to read sysclk from dts for ac10x"
This reverts commit 138d22226e.
2020-09-14 14:26:40 +01:00
Hin-Tak Leung
cf2a5fe807 Use pr_warn() for recoverable errors, not pr_info() 2020-09-13 18:24:25 +01:00
Hin-Tak Leung
471f88b337 Use pr_info() for just routine information, not pr_warn() 2020-09-13 18:18:30 +01:00
Hin-Tak Leung
d5b71a009d Merge branch 'v5.7' into v5.8 2020-09-12 00:30:16 +01:00
Hin-Tak Leung
bccf557d62 Merge branch 'v5.5' into v5.7 2020-09-12 00:29:40 +01:00
Hin-Tak Leung
a5095cd7b2 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-10 23:21:45 +01:00
Hin-Tak Leung
bcdc10e193 Merge branch 'v5.7' into v5.8 2020-09-09 03:34:47 +01:00
Hin-Tak Leung
ebb9a9d82a Merge branch 'v5.5' into v5.7 2020-09-09 03:34:14 +01:00
Hin-Tak Leung
783eff8779 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-09 03:32:10 +01:00
Hin-Tak Leung
ec5fc9d9b8 Merge remote-tracking branch 'origin/v5.7' into v5.8 2020-09-04 23:52:34 +01:00
Hin-Tak Leung
bb1422182b Merge remote-tracking branch 'origin/v5.5' into v5.7 2020-09-04 23:50:14 +01:00
Hin-Tak Leung
f2b2516426 update check_kernel_headers() for Ubuntu header packages 2020-09-04 23:47:28 +01:00
Hin-Tak Leung
e26006d40c Add reference to Ubuntu kernel package names
Signed-off-by: Hin-Tak Leung <htl10@users.sourceforge.net>
2020-09-04 23:47:18 +01:00
Hin-Tak Leung
138d22226e 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-04 20:44:32 +01:00
Hin-Tak Leung
a24da444df v5.8: snd_soc_pcm_runtime->cpu_dai/codec_dai/cpu_dais/codec_dais removed
perl -pi -e 's/rtd->cpu_dai/asoc_rtd_to_cpu\(rtd, 0\)/' seeed-voicecard.c
perl -pi -e 's/rtd->codec_dai/asoc_rtd_to_codec\(rtd, 0\)/' seeed-voicecard.c

commit 1729025b04b9f242dca37f50dba8dd3705eb1ea1
Author: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Date:   Mon Mar 30 10:48:27 2020 +0900

    ASoC: soc-core: remove cpu_dai/codec_dai/cpu_dais/codec_dais

    No-one is using cpu_dai/codec_dai/cpu_dais/codec_dais.
    Let's remove these from snd_soc_pcm_runtime

commit c2233a266178f8937cc26a84cd7672334b5424b7
Author: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Date:   Mon Mar 30 10:47:37 2020 +0900

    ASoC: soc: use asoc_rtd_to_cpu() / asoc_rtd_to_codec() macro for DAI pointer
2020-08-30 19:20:19 +01:00
Hin-Tak Leung
c3adcde556 v5.8: struct snd_soc_dai->active replaced by snd_soc_dai_active(snd_soc_dai)
commit 0812a08ac8d054efc6cf2895d3b0e82c8731f8e9
Author: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Date:   Fri May 15 09:48:02 2020 +0900

    ASoC: cleanup dai / component active code

    No one is using dai->active, snd_soc_component_is_active().
    Let's remove these.

commit efffd9b344adbf813e3ae6f6136df80000bf2833
Author: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Date:   Fri May 15 09:46:37 2020 +0900

    ASoC: soc-dai: add snd_soc_dai_active()

    Current snd_soc_dai_action() is updating
    dai->stream_active for Playback/Capture (A),
    dai->active        for DAI (B)

            void snd_soc_dai_action(struct snd_soc_dai *dai,
                                    int stream, int action)
            {
    (A)             dai->stream_active[stream]      += action;
    (B)             dai->active                     += action;
                    dai->component->active          += action;
            }

    But, these are very verbose, because we can calculate
    DAI active from stream_active.

    This patch adds snd_soc_dai_active() which calculate
    DAI active from DAI stream_active.
2020-08-30 19:19:57 +01:00
Hin-Tak Leung
1452d85e0f Merge branch 'v5.5' into v5.7 2020-08-27 13:17:54 +01:00
Hin-Tak Leung
329c8090ea make the config un-install directory configurable, for Ubuntu 2020-08-27 13:17:20 +01:00
Hin-Tak Leung
53c0db449b make the overlay un-install directory configurable, for Ubuntu 2020-08-27 13:15:03 +01:00
Hin-Tak Leung
89f8a76646 Allow kernel images to be elsewhere - Ubuntu kernel is not at Raspbian location 2020-08-24 12:04:38 +01:00
Hin-Tak Leung
39c134f430 Merge branch 'v5.5' into v5.7 2020-08-24 11:00:38 +01:00
Hin-Tak Leung
17944791bb Merge git://github.com/respeaker/seeed-voicecard into v5.5
This is not a merge - just to note that we don't care about those two
changes upstream.
2020-08-24 10:58:42 +01:00
Hin-Tak Leung
df68ab22d6 Merge remote-tracking branch 'origin/v5.5' into v5.7 2020-08-23 20:43:08 +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