Commit graph

331 commits

Author SHA1 Message Date
KillingJacky
468b40eee5 fix typo 2020-04-27 08:19:50 +01:00
Jack Shao
07a6c4659e
update README.md explaining the cmd line option --compat-kernel 2020-04-27 15:16:05 +08:00
KillingJacky
ad4d66d3f7 add an cmd line option for choosing compile with compatible kernel; clean up more when uninstalling 2020-04-27 07:58:47 +01:00
Hin-Tak Leung
add12477e9 use the kernel's way of suppressing fallthrough
See include/linux/compiler_attributes.h:

/*
 * Add the pseudo keyword 'fallthrough' so case statement blocks
 * must end with any of these keywords:
 *   break;
 *   fallthrough;
 *   goto <label>;
 *   return [expression];
 *
 *  gcc: https://gcc.gnu.org/onlinedocs/gcc/Statement-Attributes.html#Statement-Attributes
 */
-if __has_attribute(__fallthrough__)
- define fallthrough                    __attribute__((__fallthrough__))
-else
- define fallthrough                    do {} while (0)  /* fallthrough */
-endif
2020-04-27 01:10:51 +01:00
Hin-Tak Leung
74d65bfcbd use the kernel's way of suppressing fallthrough
See include/linux/compiler_attributes.h:

/*
 * Add the pseudo keyword 'fallthrough' so case statement blocks
 * must end with any of these keywords:
 *   break;
 *   fallthrough;
 *   goto <label>;
 *   return [expression];
 *
 *  gcc: https://gcc.gnu.org/onlinedocs/gcc/Statement-Attributes.html#Statement-Attributes
 */
-if __has_attribute(__fallthrough__)
- define fallthrough                    __attribute__((__fallthrough__))
-else
- define fallthrough                    do {} while (0)  /* fallthrough */
-endif
2020-04-27 01:07:51 +01:00
Hin-Tak Leung
deed034f31 suppress another "this statement may fall through" warning
The whole warning is quite long but looks like this:

  CC [M]  seeed-voicecard/ac108.o
In file included from ./include/linux/printk.h:331,
                 from ./include/linux/kernel.h:15,
                 from ./include/linux/list.h:9,
                 from ./include/linux/module.h:12,
                 from seeed-voicecard/ac108.c:15:
seeed-voicecard/ac108.c: In function ‘ac108_set_fmt’:
./include/linux/dynamic_debug.h:122:52: warning: this statement may fall through [-Wimplicit-fallthrough=]
  122 | #define __dynamic_func_call(id, fmt, func, ...) do { \
      |                                                    ^
./include/linux/dynamic_debug.h:143:2: note: in expansion of macro ‘__dynamic_func_call’
  143 |  __dynamic_func_call(__UNIQUE_ID(ddebug), fmt, func, ##__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:1795:2: note: in expansion of macro ‘dynamic_dev_dbg’
 1795 |  dynamic_dev_dbg(dev, dev_fmt(fmt), ##__VA_ARGS__)
      |  ^~~~~~~~~~~~~~~
seeed-voicecard/ac108.c:866:4: note: in expansion of macro ‘dev_dbg’
  866 |    dev_dbg(dai->dev, "used as slave when AC101 is master\n");
      |    ^~~~~~~
seeed-voicecard/ac108.c:868:2: note: here
  868 |  case SND_SOC_DAIFMT_CBS_CFS:    /*AC108 Slave*/
      |  ^~~~
2020-04-27 00:15:00 +01:00
Hin-Tak Leung
2563020e29 suppress "this statement may fall through" warning
The semi-colon is needed, to prevent the comment being parsed as part of the "if {...}" statement.

The warning looks like this:

seeed-voicecard/wm8960.c: In function ‘wm8960_hw_params’:
seeed-voicecard/wm8960.c:752:6: warning: this statement may fall through [-Wimplicit-fallthrough=]
  752 |   if ((iface & 0x3) != 0) {
      |      ^
seeed-voicecard/wm8960.c:757:2: note: here
  757 |  default:
      |  ^~~~~~~
2020-04-27 00:14:47 +01:00
Hin-Tak Leung
30276c80bc Don't force kernel downgrade
Revert "Fix: try to use a specific version kernel & headers"

This reverts commit ae32476755.

Conflicts:
	install.sh
2020-04-26 23:47:45 +01:00
Hin-Tak Leung
82c8d1024a suppress another "this statement may fall through" warning
The whole warning is quite long but looks like this:

  CC [M]  seeed-voicecard/ac108.o
In file included from ./include/linux/printk.h:331,
                 from ./include/linux/kernel.h:15,
                 from ./include/linux/list.h:9,
                 from ./include/linux/module.h:12,
                 from seeed-voicecard/ac108.c:15:
seeed-voicecard/ac108.c: In function ‘ac108_set_fmt’:
./include/linux/dynamic_debug.h:122:52: warning: this statement may fall through [-Wimplicit-fallthrough=]
  122 | #define __dynamic_func_call(id, fmt, func, ...) do { \
      |                                                    ^
./include/linux/dynamic_debug.h:143:2: note: in expansion of macro ‘__dynamic_func_call’
  143 |  __dynamic_func_call(__UNIQUE_ID(ddebug), fmt, func, ##__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:1795:2: note: in expansion of macro ‘dynamic_dev_dbg’
 1795 |  dynamic_dev_dbg(dev, dev_fmt(fmt), ##__VA_ARGS__)
      |  ^~~~~~~~~~~~~~~
seeed-voicecard/ac108.c:866:4: note: in expansion of macro ‘dev_dbg’
  866 |    dev_dbg(dai->dev, "used as slave when AC101 is master\n");
      |    ^~~~~~~
seeed-voicecard/ac108.c:868:2: note: here
  868 |  case SND_SOC_DAIFMT_CBS_CFS:    /*AC108 Slave*/
      |  ^~~~
2020-04-26 23:39:25 +01:00
Hin-Tak Leung
476378c156 suppress "this statement may fall through" warning
The semi-colon is needed, to prevent the comment being parsed as part of the "if {...}" statement.

The warning looks like this:

seeed-voicecard/wm8960.c: In function ‘wm8960_hw_params’:
seeed-voicecard/wm8960.c:752:6: warning: this statement may fall through [-Wimplicit-fallthrough=]
  752 |   if ((iface & 0x3) != 0) {
      |      ^
seeed-voicecard/wm8960.c:757:2: note: here
  757 |  default:
      |  ^~~~~~~
2020-04-26 23:27:54 +01:00
Hin-Tak Leung
4c15036368 copy asoc_simple_card_parse_dai() from v5.4:sound/soc/generic/simple-card.c
Towards the end of the series in asoc-v5.2:

commit 8f7f298a333761a528e103cda3b42f3a416ad1ee
Author: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Date:   Wed Mar 20 13:56:36 2019 +0900

    ASoC: simple-card-utils: separate asoc_simple_card_parse_dai()

    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 using
    asoc_simple_card_parse_dai() which is different implementation.
    But, these are implemanted at simple-card-utils.
    It should be implemanted at each files.
    This patch separate these into each files.

$ git log --format=oneline 0580dde59438686d60762b6da9229ebec693b94f^..ad11e59f52d6fc75037ac3cb66dc711b83c1bbf8
ad11e59f52d6fc75037ac3cb66dc711b83c1bbf8 ASoC: simple-card-utils: rename asoc_simple_card_xxx() to asoc_simple_()
8f7f298a333761a528e103cda3b42f3a416ad1ee ASoC: simple-card-utils: separate asoc_simple_card_parse_dai()
65a5056b21202eff7f54243e587183f4bb6ed352 ASoC: simple-card-utils: share asoc_simple_card_init_priv()
629f75440a68220a78aef9d8569831824890c47d ASoC: simple-card-utils: share asoc_simple_be_hw_params_fixup()
ad934ca8010843482d61fda46786449a9bc99e10 ASoC: simple-card-utils: share asoc_simple_dai_init()
f48dcbb6d47d870cf3a03f453c923dd262158c66 ASoC: simple-card-utils: share asoc_simple_hw_param()
686911b46fb5a08df142fe22b6c06dc6fbd3ba65 ASoC: simple-card-utils: share asoc_simple_shutdown()
f38df5bf0c9cb905fa9d5abc86c3a00128cdbba5 ASoC: simple-card-utils: share asoc_simple_startup()
e59289cda8dec0153fa396864c8ba8092ec3b80d ASoC: simple_card_utils: share common priv for simple-card/audio-graph
0580dde59438686d60762b6da9229ebec693b94f ASoC: simple-card-utils: add asoc_simple_debug_info()
2020-04-26 22:48:50 +01:00
Hin-Tak Leung
cb9bf1c913 adjust for changes in aux_dev
In 5.4:

commit a48b561d873d1d9fda55782d275eff94ec647863
Author: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Date:   Thu Aug 8 14:54:39 2019 +0900

    ASoC: soc-core: remove legacy style of aux_dev
2020-04-24 05:13:41 +01:00
Hin-Tak Leung
37a37a6d16 adjust for modern style dai_link
In v5.3:

commit f107294c6422e772773b53dbf802186175b6289e
Author: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Date:   Thu Jun 6 13:07:35 2019 +0900

    ASoC: simple-card: support snd_soc_dai_link_component style for cpu
2020-04-24 04:58:58 +01:00
Hin-Tak Leung
de22f92298 asoc_simple_card_init_dai is not exported, but asoc_simple_dai_init is, and does more
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-04-24 04:33:49 +01:00
Hin-Tak Leung
72d3c9e2f6 DAI and CELL not used in macros.
In v5.2:

commit 8f7f298a333761a528e103cda3b42f3a416ad1ee
Author: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Date:   Wed Mar 20 13:56:36 2019 +0900

    ASoC: simple-card-utils: separate asoc_simple_card_parse_dai()
2020-04-24 04:03:19 +01:00
Hin-Tak Leung
b9272dcee8 asoc_simple_card_canonicalize_platform returns void, and always successful
In v5.1:

commit fe7ed4dec2e6289eab81dd18c0d613c0851d85a1
Author: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Date:   Mon Jan 21 16:40:59 2019 +0900

    ASoC: simple-card: rename to asoc_simple_card_canonicalize_platform()

    Current simple-card is using asoc_simple_card_canonicalize_dailink().
    Its naming is "dailink", but is for "platform".
    We already have asoc_simple_card_canonicalize_cpu() for "cpu",
    let's follow same naming rule.
    It never return error, so, void function is better idea.
2020-04-24 03:50:41 +01:00
Hin-Tak Leung
61022875b3 asoc_simple_canonicalize_dailink() to asoc_simple_canonicalize_platform()
In v5.1:

commit fe7ed4dec2e6289eab81dd18c0d613c0851d85a1
Author: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Date:   Mon Jan 21 16:40:59 2019 +0900

    ASoC: simple-card: rename to asoc_simple_card_canonicalize_platform()
2020-04-24 03:43:13 +01:00
Hin-Tak Leung
41c71f1b45 rename asoc_simple_card_xxx() to asoc_simple_()
First appeared in v5.2:

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

    ASoC: simple-card-utils: rename asoc_simple_card_xxx() to asoc_simple_()
2020-04-24 03:35:45 +01:00
Hin-Tak Leung
8c5ffaeed3 LINUX_VERSION_IS_GEQ macro from Linux kernel backports package 2020-04-24 02:27:58 +01:00
hhuysqt
920ef83b63 Add: compatible to linux kernel 5.3.0 or higher 2020-03-30 12:23:36 +08:00
HinTak
48463b9a50 Correct typo
Fix typo in comment.
2020-03-30 09:01:36 +08:00
mxklb
2da704e872 Check for enough space on /boot volume (check #209) 2020-02-15 16:38:04 +08:00
HinTak
d6f808b278 fix typo 2020-01-29 14:32:30 +08:00
SamhithPottem
873580cfd5 Update install.sh (#182) to --force-yes install 2019-10-23 11:16:55 +08:00
turmary
ae32476755 Fix: try to use a specific version kernel & headers 2019-10-22 15:59:07 +01:00
Baozhu Zuo
277aeacb81
The latest kernel of raspberry PI is unstable, so do this anyway to make sure the driver loads correctly 2019-07-25 19:39:07 +08:00
Baozhu Zuo
08f0d96d68
raspberry pi 4 use the v7l+ suffix as the kernel identifier 2019-07-25 19:30:04 +08:00
turmary
da5f90473b Fix: removing asound.conf when detecting i2c addresses 2019-05-22 10:39:09 +08:00
turmary
0ea5d2bd98 Fix: dtoverlay on Linux v4.19 failed in phandle insertion 2019-05-21 12:18:25 +08:00
Baozhu Zuo
c7026a4048
remove sleep , accelerate the seeed-voicecard service startup 2019-04-17 14:58:21 +08:00
Baozhu Zuo
11e9db79b5
remove sleep , accelerate the seeed-voicecard service startup 2019-04-17 14:58:07 +08:00
turmary
90d2673610 Add: kernel headers checking after action rpi-update 2019-04-16 09:34:10 +08:00
Norbert Preining
09728d1c82 allow installation in qemu
Currently, installation is only supported on real hardware, but not
running in QEMU. Change the check to make sure the necessary
directories and programs are available instead of bailing out
on non-Raspberry archs.
2019-03-30 14:19:47 +08:00
respeaker
b98fce84e0 Add: compatible to linux-4.18 or higher 2019-03-14 03:13:25 +00:00
Pernat1y
6c6b9ab7de Install packages for Arch Linux 2019-01-28 09:23:40 +08:00
Pernat1y
27b6cdf252 Make grep searches more precise 2019-01-28 09:23:40 +08:00
Baozhu Zuo
f5b82b6b7d
Merge pull request #123 from baorepo/patch-1
test hardware mic phase position
2018-12-25 09:37:27 +08:00
Baozhu Zuo
5744fd1bbb
test hardware mic phase position
baozhu@bz:/tmp$ python wave_test.py record.wav 
2
['448.8125', '446.65625', '-0.1875', '330.8125', '448.375', '450.59375', '451.0']
['448.78125', '448.5625', '-0.1875', '-0.125', '448.3125', '-0.125', '-450.78125']
['0.0', '0.0', '0.0', '-0.09375', '-0.09375', '-0.09375', '0.21875']
['0.0', '0.0', '0.0', '-0.09375', '-0.09375', '-0.09375', '0.21875']
['0.0', '0.0', '0.0', '-0.09375', '-0.09375', '-0.09375', '0.21875']
['0.0', '0.0', '0.0', '-0.09375', '-0.09375', '-0.09375', '0.21875']
['0.0', '0.0', '0.0', '-0.09375', '-0.09375', '-0.09375', '0.21875']
['0.0', '0.0', '0.0', '-0.09375', '-0.09375', '-0.09375', '0.21875']
['0.0', '0.0', '0.0', '-0.09375', '-0.09375', '-0.09375', '0.21875']
['0.0', '0.0', '0.0', '-0.09375', '-0.09375', '-0.09375', '0.21875']
['0.0', '0.0', '0.0', '-0.09375', '-0.09375', '-0.09375', '0.21875']
['0.0', '0.0', '0.0', '-0.09375', '-0.09375', '-0.09375', '0.21875']
['0.0', '0.0', '0.0', '-0.09375', '-0.09375', '-0.09375', '0.21875']
['0.0', '0.0', '0.0', '-0.09375', '-0.09375', '-0.09375', '0.21875']
['0.0', '0.0', '0.0', '-0.09375', '-0.09375', '-0.09375', '0.21875']
['0.0', '0.0', '0.0', '-0.09375', '-0.09375', '-0.0625', '0.21875']
['0.0', '0.0', '0.0', '-0.09375', '-0.09375', '-0.09375', '0.21875']
['0.0', '0.0', '0.0', '-0.09375', '-0.09375', '-0.09375', '0.21875']
['0.0', '0.0', '0.0', '-0.09375', '-0.09375', '-0.09375', '0.25']
['0.0', '0.0', '0.0', '-0.09375', '-0.09375', '-0.09375', '0.25']
['0.0', '0.0', '0.0', '-0.09375', '-0.09375', '-0.09375', '0.25']
['0.0', '0.0', '0.0', '-0.09375', '-0.09375', '-0.09375', '0.25']
['0.0', '0.0', '0.0', '-0.09375', '-0.09375', '-0.09375', '0.21875']
['0.0', '0.0', '0.0', '-0.09375', '-0.09375', '-0.09375', '0.21875']
['0.0', '0.0', '0.0', '-0.09375', '-0.09375', '-0.09375', '0.21875']
['0.0', '0.0', '0.0', '-0.09375', '-0.09375', '-0.09375', '0.21875']
['0.0', '0.0', '0.0', '-0.09375', '-0.09375', '-0.09375', '0.21875']
['0.0', '0.0', '0.0', '-0.09375', '-0.09375', '-0.09375', '-0.96875']
['0.03125', '0.0', '-0.0625', '-0.09375', '-0.0625', '-0.09375', '-23.0625']
['0.0', '0.0', '-0.0625', '-0.09375', '-0.0625', '-0.09375', '-23.125']
done
48000
2018-12-25 09:36:27 +08:00
turmary
95f4fe0688 Fix: remove spin lock in machine trigger 2018-11-27 09:47:44 +00:00
turmary
3392bf394b Fix: try to stop aif clock in thread environment 2018-11-07 18:33:55 -10:00
turmary
0965139ead Optimize: simplify AC101 debug message 2018-11-07 15:29:06 -10:00
Jack Shao
be0812c70b update: more convenient way to apply udev rules 2018-10-11 17:54:51 +08:00
KillingJacky
dfc7b404a5 change asound.state for 4mic array, lower down PGA to reduce static noise 2018-09-29 14:49:19 +08:00
Baozhu Zuo
deeddaabb4
seeed-voicecard: if the board detect seeed-voicecard then resetup asound.conf and asound.state 2018-09-29 14:36:01 +08:00
Yihui Xiong
bfe6978ef4 update 6 mic gain controls 2018-08-06 06:32:46 +00:00
Yihui Xiong
67b4504964
Update asound_6mic.conf 2018-08-01 18:54:25 +08:00
Baozhu Zuo
bca16c68c4
Update README.md 2018-07-30 15:51:18 +08:00
Baozhu Zuo
ab0b28d08f
Update README.md 2018-07-30 15:44:47 +08:00
Baozhu Zuo
a73335b8d0
Merge pull request #92 from respeaker/dev
Dev
2018-07-26 08:58:15 +08:00
Baozhu Zuo
58c6233325 use sound card id 2018-07-24 11:39:01 +08:00