From: kbuild test robot <lkp@intel.com>
To: Yongbo Zhang <giraffesnn123@gmail.com>,
broonie@kernel.org, lgirdwood@gmail.com,
alsa-devel@alsa-project.org, linux-renesas-soc@vger.kernel.org,
linux-kernel@vger.kernel.org,
Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>,
Chen Li <licheng0822@thundersoft.com>
Cc: kbuild-all@lists.01.org, clang-built-linux@googlegroups.com,
alsa-devel@alsa-project.org, linux-renesas-soc@vger.kernel.org,
linux-kernel@vger.kernel.org,
Yongbo Zhang <giraffesnn123@gmail.com>,
Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Subject: Re: [PATCH] ASoC: rsnd: add interrupt support for SSI BUSIF buffer
Date: Sat, 9 May 2020 07:56:36 +0800 [thread overview]
Message-ID: <202005090732.6ezYxpsf%lkp@intel.com> (raw)
In-Reply-To: <20200508074753.10362-1-giraffesnn123@gmail.com>
[-- Attachment #1: Type: text/plain, Size: 20431 bytes --]
Hi Yongbo,
Thank you for the patch! Yet something to improve:
[auto build test ERROR on asoc/for-next]
[also build test ERROR on v5.7-rc4 next-20200508]
[if your patch is applied to the wrong git tree, please drop us a note to help
improve the system. BTW, we also suggest to use '--base' option to specify the
base tree in git format-patch, please see https://stackoverflow.com/a/37406982]
url: https://github.com/0day-ci/linux/commits/Yongbo-Zhang/ASoC-rsnd-add-interrupt-support-for-SSI-BUSIF-buffer/20200509-035713
base: https://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound.git for-next
config: arm-defconfig (attached as .config)
compiler: clang version 11.0.0 (https://github.com/llvm/llvm-project 6d2a66b10d458e34c852be46028092d2b46edc14)
reproduce:
wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
chmod +x ~/bin/make.cross
# install arm cross compiling tool for clang build
# apt-get install binutils-arm-linux-gnueabi
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross ARCH=arm
If you fix the issue, kindly add following tag as appropriate
Reported-by: kbuild test robot <lkp@intel.com>
All errors (new ones prefixed by >>):
>> sound/soc/sh/rcar/ssi.c:600:1: error: function definition is not allowed here
{
^
sound/soc/sh/rcar/ssi.c:618:1: error: function definition is not allowed here
{
^
sound/soc/sh/rcar/ssi.c:651:1: error: function definition is not allowed here
{
^
sound/soc/sh/rcar/ssi.c:696:1: error: function definition is not allowed here
{
^
>> sound/soc/sh/rcar/ssi.c:734:1: error: function declared in block scope cannot have 'static' storage class
static bool rsnd_ssi_pio_interrupt(struct rsnd_mod *mod,
^
sound/soc/sh/rcar/ssi.c:738:1: error: function definition is not allowed here
{
^
sound/soc/sh/rcar/ssi.c:830:1: error: function definition is not allowed here
{
^
sound/soc/sh/rcar/ssi.c:841:1: error: function definition is not allowed here
{
^
sound/soc/sh/rcar/ssi.c:878:1: error: function definition is not allowed here
{
^
sound/soc/sh/rcar/ssi.c:909:1: error: function definition is not allowed here
{
^
sound/soc/sh/rcar/ssi.c:923:1: error: function definition is not allowed here
{
^
sound/soc/sh/rcar/ssi.c:966:1: error: function definition is not allowed here
{
^
sound/soc/sh/rcar/ssi.c:989:1: error: function definition is not allowed here
{
^
sound/soc/sh/rcar/ssi.c:1033:1: error: function definition is not allowed here
{
^
sound/soc/sh/rcar/ssi.c:1051:1: error: function definition is not allowed here
{
^
sound/soc/sh/rcar/ssi.c:1063:1: error: function definition is not allowed here
{
^
>> sound/soc/sh/rcar/ssi.c:1069:12: error: use of undeclared identifier 'rsnd_ssi_common_probe'
.probe = rsnd_ssi_common_probe,
^
>> sound/soc/sh/rcar/ssi.c:1070:13: error: use of undeclared identifier 'rsnd_ssi_common_remove'
.remove = rsnd_ssi_common_remove,
^
>> sound/soc/sh/rcar/ssi.c:1071:11: error: use of undeclared identifier 'rsnd_ssi_pio_init'
.init = rsnd_ssi_pio_init,
^
fatal error: too many errors emitted, stopping now [-ferror-limit=]
20 errors generated.
vim +600 sound/soc/sh/rcar/ssi.c
ae5c322303fff5 Kuninori Morimoto 2013-07-21 595
919567d914b3c1 Kuninori Morimoto 2015-04-10 596 static int rsnd_ssi_hw_params(struct rsnd_mod *mod,
2c0fac19de2cd7 Kuninori Morimoto 2015-06-15 597 struct rsnd_dai_stream *io,
919567d914b3c1 Kuninori Morimoto 2015-04-10 598 struct snd_pcm_substream *substream,
919567d914b3c1 Kuninori Morimoto 2015-04-10 599 struct snd_pcm_hw_params *params)
919567d914b3c1 Kuninori Morimoto 2015-04-10 @600 {
fb2815f44a9eb3 Dragos Tarcatu 2018-09-03 601 struct rsnd_dai *rdai = rsnd_io_to_rdai(io);
fb2815f44a9eb3 Dragos Tarcatu 2018-09-03 602 unsigned int fmt_width = snd_pcm_format_width(params_format(params));
fb2815f44a9eb3 Dragos Tarcatu 2018-09-03 603
fb2815f44a9eb3 Dragos Tarcatu 2018-09-03 604 if (fmt_width > rdai->chan_width) {
fb2815f44a9eb3 Dragos Tarcatu 2018-09-03 605 struct rsnd_priv *priv = rsnd_io_to_priv(io);
fb2815f44a9eb3 Dragos Tarcatu 2018-09-03 606 struct device *dev = rsnd_priv_to_dev(priv);
fb2815f44a9eb3 Dragos Tarcatu 2018-09-03 607
fb2815f44a9eb3 Dragos Tarcatu 2018-09-03 608 dev_err(dev, "invalid combination of slot-width and format-data-width\n");
fb2815f44a9eb3 Dragos Tarcatu 2018-09-03 609 return -EINVAL;
fb2815f44a9eb3 Dragos Tarcatu 2018-09-03 610 }
919567d914b3c1 Kuninori Morimoto 2015-04-10 611
919567d914b3c1 Kuninori Morimoto 2015-04-10 612 return 0;
919567d914b3c1 Kuninori Morimoto 2015-04-10 613 }
919567d914b3c1 Kuninori Morimoto 2015-04-10 614
6a25c8da00284f Kuninori Morimoto 2016-01-26 615 static int rsnd_ssi_start(struct rsnd_mod *mod,
2c0fac19de2cd7 Kuninori Morimoto 2015-06-15 616 struct rsnd_dai_stream *io,
690602fcd85385 Kuninori Morimoto 2015-01-15 617 struct rsnd_priv *priv)
4e7d606cd52aa8 Kuninori Morimoto 2014-11-27 @618 {
597b046f0d99b0 Kuninori Morimoto 2017-08-08 619 struct rsnd_ssi *ssi = rsnd_mod_to_ssi(mod);
597b046f0d99b0 Kuninori Morimoto 2017-08-08 620
fd9adcfdc1434f Kuninori Morimoto 2016-02-18 621 if (!rsnd_ssi_is_run_mods(mod, io))
fd9adcfdc1434f Kuninori Morimoto 2016-02-18 622 return 0;
fd9adcfdc1434f Kuninori Morimoto 2016-02-18 623
b4c83b17155781 Kuninori Morimoto 2015-12-17 624 /*
b4c83b17155781 Kuninori Morimoto 2015-12-17 625 * EN will be set via SSIU :: SSI_CONTROL
b4c83b17155781 Kuninori Morimoto 2015-12-17 626 * if Multi channel mode
b4c83b17155781 Kuninori Morimoto 2015-12-17 627 */
4f5c634d58e719 Kuninori Morimoto 2016-02-18 628 if (rsnd_ssi_multi_slaves_runtime(io))
0dc6bf75023a42 Kuninori Morimoto 2016-02-18 629 return 0;
4e7d606cd52aa8 Kuninori Morimoto 2014-11-27 630
597b046f0d99b0 Kuninori Morimoto 2017-08-08 631 /*
597b046f0d99b0 Kuninori Morimoto 2017-08-08 632 * EN is for data output.
597b046f0d99b0 Kuninori Morimoto 2017-08-08 633 * SSI parent EN is not needed.
597b046f0d99b0 Kuninori Morimoto 2017-08-08 634 */
0c258657ddfe81 Matthias Blankertz 2020-04-17 635 if (rsnd_ssi_is_parent(mod, io))
597b046f0d99b0 Kuninori Morimoto 2017-08-08 636 return 0;
597b046f0d99b0 Kuninori Morimoto 2017-08-08 637
597b046f0d99b0 Kuninori Morimoto 2017-08-08 638 ssi->cr_en = EN;
597b046f0d99b0 Kuninori Morimoto 2017-08-08 639
597b046f0d99b0 Kuninori Morimoto 2017-08-08 640 rsnd_mod_write(mod, SSICR, ssi->cr_own |
597b046f0d99b0 Kuninori Morimoto 2017-08-08 641 ssi->cr_clk |
597b046f0d99b0 Kuninori Morimoto 2017-08-08 642 ssi->cr_mode |
597b046f0d99b0 Kuninori Morimoto 2017-08-08 643 ssi->cr_en);
4e7d606cd52aa8 Kuninori Morimoto 2014-11-27 644
4e7d606cd52aa8 Kuninori Morimoto 2014-11-27 645 return 0;
4e7d606cd52aa8 Kuninori Morimoto 2014-11-27 646 }
4e7d606cd52aa8 Kuninori Morimoto 2014-11-27 647
6a25c8da00284f Kuninori Morimoto 2016-01-26 648 static int rsnd_ssi_stop(struct rsnd_mod *mod,
e7d850dd10f4e6 Kuninori Morimoto 2015-10-26 649 struct rsnd_dai_stream *io,
e7d850dd10f4e6 Kuninori Morimoto 2015-10-26 650 struct rsnd_priv *priv)
e7d850dd10f4e6 Kuninori Morimoto 2015-10-26 651 {
6a25c8da00284f Kuninori Morimoto 2016-01-26 652 struct rsnd_ssi *ssi = rsnd_mod_to_ssi(mod);
6a25c8da00284f Kuninori Morimoto 2016-01-26 653 u32 cr;
6a25c8da00284f Kuninori Morimoto 2016-01-26 654
fd9adcfdc1434f Kuninori Morimoto 2016-02-18 655 if (!rsnd_ssi_is_run_mods(mod, io))
fd9adcfdc1434f Kuninori Morimoto 2016-02-18 656 return 0;
fd9adcfdc1434f Kuninori Morimoto 2016-02-18 657
0c258657ddfe81 Matthias Blankertz 2020-04-17 658 if (rsnd_ssi_is_parent(mod, io))
6a25c8da00284f Kuninori Morimoto 2016-01-26 659 return 0;
4e7d606cd52aa8 Kuninori Morimoto 2014-11-27 660
e7d850dd10f4e6 Kuninori Morimoto 2015-10-26 661 cr = ssi->cr_own |
e7d850dd10f4e6 Kuninori Morimoto 2015-10-26 662 ssi->cr_clk;
e7d850dd10f4e6 Kuninori Morimoto 2015-10-26 663
ce548931207c0d Kuninori Morimoto 2017-10-31 664 /*
ce548931207c0d Kuninori Morimoto 2017-10-31 665 * disable all IRQ,
ce548931207c0d Kuninori Morimoto 2017-10-31 666 * Playback: Wait all data was sent
ce548931207c0d Kuninori Morimoto 2017-10-31 667 * Capture: It might not receave data. Do nothing
ce548931207c0d Kuninori Morimoto 2017-10-31 668 */
ce548931207c0d Kuninori Morimoto 2017-10-31 669 if (rsnd_io_is_play(io)) {
54cb6221688660 Matthias Blankertz 2020-04-17 670 rsnd_mod_write(mod, SSICR, cr | ssi->cr_en);
e7d850dd10f4e6 Kuninori Morimoto 2015-10-26 671 rsnd_ssi_status_check(mod, DIRQ);
ce548931207c0d Kuninori Morimoto 2017-10-31 672 }
e7d850dd10f4e6 Kuninori Morimoto 2015-10-26 673
54cb6221688660 Matthias Blankertz 2020-04-17 674 /* In multi-SSI mode, stop is performed by setting ssi0129 in
54cb6221688660 Matthias Blankertz 2020-04-17 675 * SSI_CONTROL to 0 (in rsnd_ssio_stop_gen2). Do nothing here.
54cb6221688660 Matthias Blankertz 2020-04-17 676 */
54cb6221688660 Matthias Blankertz 2020-04-17 677 if (rsnd_ssi_multi_slaves_runtime(io))
54cb6221688660 Matthias Blankertz 2020-04-17 678 return 0;
54cb6221688660 Matthias Blankertz 2020-04-17 679
e7d850dd10f4e6 Kuninori Morimoto 2015-10-26 680 /*
e7d850dd10f4e6 Kuninori Morimoto 2015-10-26 681 * disable SSI,
e7d850dd10f4e6 Kuninori Morimoto 2015-10-26 682 * and, wait idle state
e7d850dd10f4e6 Kuninori Morimoto 2015-10-26 683 */
e7d850dd10f4e6 Kuninori Morimoto 2015-10-26 684 rsnd_mod_write(mod, SSICR, cr); /* disabled all */
e7d850dd10f4e6 Kuninori Morimoto 2015-10-26 685 rsnd_ssi_status_check(mod, IIRQ);
4e7d606cd52aa8 Kuninori Morimoto 2014-11-27 686
597b046f0d99b0 Kuninori Morimoto 2017-08-08 687 ssi->cr_en = 0;
597b046f0d99b0 Kuninori Morimoto 2017-08-08 688
e7d850dd10f4e6 Kuninori Morimoto 2015-10-26 689 return 0;
e7d850dd10f4e6 Kuninori Morimoto 2015-10-26 690 }
4e7d606cd52aa8 Kuninori Morimoto 2014-11-27 691
615fb6c7b13b7f Kuninori Morimoto 2016-02-18 692 static int rsnd_ssi_irq(struct rsnd_mod *mod,
615fb6c7b13b7f Kuninori Morimoto 2016-02-18 693 struct rsnd_dai_stream *io,
615fb6c7b13b7f Kuninori Morimoto 2016-02-18 694 struct rsnd_priv *priv,
615fb6c7b13b7f Kuninori Morimoto 2016-02-18 695 int enable)
615fb6c7b13b7f Kuninori Morimoto 2016-02-18 696 {
615fb6c7b13b7f Kuninori Morimoto 2016-02-18 697 u32 val = 0;
391d452251464b Yongbo Zhang 2020-05-08 698 int is_tdm, is_tdm_split;
391d452251464b Yongbo Zhang 2020-05-08 699 int id = rsnd_mod_id(mod);
391d452251464b Yongbo Zhang 2020-05-08 700
391d452251464b Yongbo Zhang 2020-05-08 701 is_tdm = rsnd_runtime_is_tdm(io);
391d452251464b Yongbo Zhang 2020-05-08 702 is_tdm_split = rsnd_runtime_is_tdm_split(io);
615fb6c7b13b7f Kuninori Morimoto 2016-02-18 703
615fb6c7b13b7f Kuninori Morimoto 2016-02-18 704 if (rsnd_is_gen1(priv))
615fb6c7b13b7f Kuninori Morimoto 2016-02-18 705 return 0;
615fb6c7b13b7f Kuninori Morimoto 2016-02-18 706
0c258657ddfe81 Matthias Blankertz 2020-04-17 707 if (rsnd_ssi_is_parent(mod, io))
615fb6c7b13b7f Kuninori Morimoto 2016-02-18 708 return 0;
615fb6c7b13b7f Kuninori Morimoto 2016-02-18 709
fd9adcfdc1434f Kuninori Morimoto 2016-02-18 710 if (!rsnd_ssi_is_run_mods(mod, io))
fd9adcfdc1434f Kuninori Morimoto 2016-02-18 711 return 0;
fd9adcfdc1434f Kuninori Morimoto 2016-02-18 712
615fb6c7b13b7f Kuninori Morimoto 2016-02-18 713 if (enable)
615fb6c7b13b7f Kuninori Morimoto 2016-02-18 714 val = rsnd_ssi_is_dma_mode(mod) ? 0x0e000000 : 0x0f000000;
615fb6c7b13b7f Kuninori Morimoto 2016-02-18 715
391d452251464b Yongbo Zhang 2020-05-08 716 if (is_tdm || is_tdm_split) {
391d452251464b Yongbo Zhang 2020-05-08 717 switch (id) {
391d452251464b Yongbo Zhang 2020-05-08 718 case 0:
391d452251464b Yongbo Zhang 2020-05-08 719 case 1:
391d452251464b Yongbo Zhang 2020-05-08 720 case 2:
391d452251464b Yongbo Zhang 2020-05-08 721 case 3:
391d452251464b Yongbo Zhang 2020-05-08 722 case 4:
391d452251464b Yongbo Zhang 2020-05-08 723 case 9:
391d452251464b Yongbo Zhang 2020-05-08 724 val |= 0xff00;
391d452251464b Yongbo Zhang 2020-05-08 725 break;
391d452251464b Yongbo Zhang 2020-05-08 726 }
391d452251464b Yongbo Zhang 2020-05-08 727 }
391d452251464b Yongbo Zhang 2020-05-08 728
615fb6c7b13b7f Kuninori Morimoto 2016-02-18 729 rsnd_mod_write(mod, SSI_INT_ENABLE, val);
615fb6c7b13b7f Kuninori Morimoto 2016-02-18 730
615fb6c7b13b7f Kuninori Morimoto 2016-02-18 731 return 0;
615fb6c7b13b7f Kuninori Morimoto 2016-02-18 732 }
615fb6c7b13b7f Kuninori Morimoto 2016-02-18 733
d8d9b9730cd62c Kuninori Morimoto 2017-12-11 @734 static bool rsnd_ssi_pio_interrupt(struct rsnd_mod *mod,
d8d9b9730cd62c Kuninori Morimoto 2017-12-11 735 struct rsnd_dai_stream *io);
bfc0cfe6b7acb1 Kuninori Morimoto 2015-06-15 736 static void __rsnd_ssi_interrupt(struct rsnd_mod *mod,
bfc0cfe6b7acb1 Kuninori Morimoto 2015-06-15 737 struct rsnd_dai_stream *io)
ae5c322303fff5 Kuninori Morimoto 2013-07-21 738 {
690602fcd85385 Kuninori Morimoto 2015-01-15 739 struct rsnd_priv *priv = rsnd_mod_to_priv(mod);
2b62786951ca38 Kuninori Morimoto 2018-02-13 740 struct device *dev = rsnd_priv_to_dev(priv);
765ae7c8dda7d0 Kuninori Morimoto 2015-01-15 741 int is_dma = rsnd_ssi_is_dma_mode(mod);
02299d9875bab5 Kuninori Morimoto 2015-05-21 742 u32 status;
75defee0f1b3fc Kuninori Morimoto 2015-06-15 743 bool elapsed = false;
6a25c8da00284f Kuninori Morimoto 2016-01-26 744 bool stop = false;
391d452251464b Yongbo Zhang 2020-05-08 745 int is_tdm, is_tdm_split;
391d452251464b Yongbo Zhang 2020-05-08 746
391d452251464b Yongbo Zhang 2020-05-08 747 is_tdm = rsnd_runtime_is_tdm(io);
391d452251464b Yongbo Zhang 2020-05-08 748 is_tdm_split = rsnd_runtime_is_tdm_split(io);
02299d9875bab5 Kuninori Morimoto 2015-05-21 749
02299d9875bab5 Kuninori Morimoto 2015-05-21 750 spin_lock(&priv->lock);
ae5c322303fff5 Kuninori Morimoto 2013-07-21 751
02299d9875bab5 Kuninori Morimoto 2015-05-21 752 /* ignore all cases if not working */
d5bbe7de563ccc Kuninori Morimoto 2015-06-15 753 if (!rsnd_io_is_working(io))
02299d9875bab5 Kuninori Morimoto 2015-05-21 754 goto rsnd_ssi_interrupt_out;
02299d9875bab5 Kuninori Morimoto 2015-05-21 755
6a25c8da00284f Kuninori Morimoto 2016-01-26 756 status = rsnd_ssi_status_get(mod);
4e7d606cd52aa8 Kuninori Morimoto 2014-11-27 757
4e7d606cd52aa8 Kuninori Morimoto 2014-11-27 758 /* PIO only */
d8d9b9730cd62c Kuninori Morimoto 2017-12-11 759 if (!is_dma && (status & DIRQ))
d8d9b9730cd62c Kuninori Morimoto 2017-12-11 760 elapsed = rsnd_ssi_pio_interrupt(mod, io);
ae5c322303fff5 Kuninori Morimoto 2013-07-21 761
12927a8f802642 Kuninori Morimoto 2015-06-15 762 /* DMA only */
2b62786951ca38 Kuninori Morimoto 2018-02-13 763 if (is_dma && (status & (UIRQ | OIRQ))) {
c0ea089dbad47a Kuninori Morimoto 2018-10-30 764 rsnd_dbg_irq_status(dev, "%s err status : 0x%08x\n",
c0ea089dbad47a Kuninori Morimoto 2018-10-30 765 rsnd_mod_name(mod), status);
2b62786951ca38 Kuninori Morimoto 2018-02-13 766
6a25c8da00284f Kuninori Morimoto 2016-01-26 767 stop = true;
2b62786951ca38 Kuninori Morimoto 2018-02-13 768 }
69e32a58bde674 Kuninori Morimoto 2015-10-26 769
391d452251464b Yongbo Zhang 2020-05-08 770 status = 0;
391d452251464b Yongbo Zhang 2020-05-08 771
391d452251464b Yongbo Zhang 2020-05-08 772 if (is_tdm || is_tdm_split) {
391d452251464b Yongbo Zhang 2020-05-08 773 switch (id) {
391d452251464b Yongbo Zhang 2020-05-08 774 case 0:
391d452251464b Yongbo Zhang 2020-05-08 775 case 1:
391d452251464b Yongbo Zhang 2020-05-08 776 case 2:
391d452251464b Yongbo Zhang 2020-05-08 777 case 3:
391d452251464b Yongbo Zhang 2020-05-08 778 case 4:
391d452251464b Yongbo Zhang 2020-05-08 779 for (i = 0; i < 4; i++) {
391d452251464b Yongbo Zhang 2020-05-08 780 status = rsnd_mod_read(mod,
391d452251464b Yongbo Zhang 2020-05-08 781 SSI_SYS_STATUS(i * 2));
391d452251464b Yongbo Zhang 2020-05-08 782 status &= 0xf << (id * 4);
391d452251464b Yongbo Zhang 2020-05-08 783
391d452251464b Yongbo Zhang 2020-05-08 784 if (status) {
391d452251464b Yongbo Zhang 2020-05-08 785 rsnd_dbg_irq_status(dev,
391d452251464b Yongbo Zhang 2020-05-08 786 "%s err status : 0x%08x\n",
391d452251464b Yongbo Zhang 2020-05-08 787 rsnd_mod_name(mod), status);
391d452251464b Yongbo Zhang 2020-05-08 788 rsnd_mod_write(mod,
391d452251464b Yongbo Zhang 2020-05-08 789 SSI_SYS_STATUS(i * 2),
391d452251464b Yongbo Zhang 2020-05-08 790 0xf << (id * 4));
391d452251464b Yongbo Zhang 2020-05-08 791 stop = true;
391d452251464b Yongbo Zhang 2020-05-08 792 break;
391d452251464b Yongbo Zhang 2020-05-08 793 }
391d452251464b Yongbo Zhang 2020-05-08 794 }
391d452251464b Yongbo Zhang 2020-05-08 795 break;
391d452251464b Yongbo Zhang 2020-05-08 796 case 9:
391d452251464b Yongbo Zhang 2020-05-08 797 for (i = 0; i < 4; i++) {
391d452251464b Yongbo Zhang 2020-05-08 798 status = rsnd_mod_write(mod,
391d452251464b Yongbo Zhang 2020-05-08 799 SSI_SYS_STATUS((i * 2) + 1));
391d452251464b Yongbo Zhang 2020-05-08 800 status &= 0xf << 4;
391d452251464b Yongbo Zhang 2020-05-08 801
391d452251464b Yongbo Zhang 2020-05-08 802 if (status) {
391d452251464b Yongbo Zhang 2020-05-08 803 rsnd_dbg_irq_status(dev,
391d452251464b Yongbo Zhang 2020-05-08 804 "%s err status : 0x%08x\n",
391d452251464b Yongbo Zhang 2020-05-08 805 rsnd_mod_name(mod), status);
391d452251464b Yongbo Zhang 2020-05-08 806 rsnd_mod_write(mod,
391d452251464b Yongbo Zhang 2020-05-08 807 SSI_SYS_STATUS((i * 2) + 1),
391d452251464b Yongbo Zhang 2020-05-08 808 0xf << 4);
391d452251464b Yongbo Zhang 2020-05-08 809 stop = true;
391d452251464b Yongbo Zhang 2020-05-08 810 break;
391d452251464b Yongbo Zhang 2020-05-08 811 }
391d452251464b Yongbo Zhang 2020-05-08 812 }
391d452251464b Yongbo Zhang 2020-05-08 813 break;
391d452251464b Yongbo Zhang 2020-05-08 814 }
391d452251464b Yongbo Zhang 2020-05-08 815 }
391d452251464b Yongbo Zhang 2020-05-08 816
5342dff2326393 Kuninori Morimoto 2015-11-26 817 rsnd_ssi_status_clear(mod);
02299d9875bab5 Kuninori Morimoto 2015-05-21 818 rsnd_ssi_interrupt_out:
02299d9875bab5 Kuninori Morimoto 2015-05-21 819 spin_unlock(&priv->lock);
02299d9875bab5 Kuninori Morimoto 2015-05-21 820
75defee0f1b3fc Kuninori Morimoto 2015-06-15 821 if (elapsed)
75defee0f1b3fc Kuninori Morimoto 2015-06-15 822 rsnd_dai_period_elapsed(io);
6a25c8da00284f Kuninori Morimoto 2016-01-26 823
6a25c8da00284f Kuninori Morimoto 2016-01-26 824 if (stop)
6a25c8da00284f Kuninori Morimoto 2016-01-26 825 snd_pcm_stop_xrun(io->substream);
6a25c8da00284f Kuninori Morimoto 2016-01-26 826
:::::: The code at line 600 was first introduced by commit
:::::: 919567d914b3c134e60c01db72a03a0adc5f41b9 ASoC: rsnd: make sure SSI parent/child uses same number of sound channel.
:::::: TO: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
:::::: CC: Mark Brown <broonie@kernel.org>
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
[-- Attachment #2: .config.gz --]
[-- Type: application/gzip, Size: 51794 bytes --]
WARNING: multiple messages have this Message-ID (diff)
From: kbuild test robot <lkp@intel.com>
To: Yongbo Zhang <giraffesnn123@gmail.com>,
broonie@kernel.org, lgirdwood@gmail.com,
alsa-devel@alsa-project.org, linux-renesas-soc@vger.kernel.org,
linux-kernel@vger.kernel.org,
Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>,
Chen Li <licheng0822@thundersoft.com>
Cc: alsa-devel@alsa-project.org, kbuild-all@lists.01.org,
Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>,
linux-kernel@vger.kernel.org, linux-renesas-soc@vger.kernel.org,
clang-built-linux@googlegroups.com,
Yongbo Zhang <giraffesnn123@gmail.com>
Subject: Re: [PATCH] ASoC: rsnd: add interrupt support for SSI BUSIF buffer
Date: Sat, 9 May 2020 07:56:36 +0800 [thread overview]
Message-ID: <202005090732.6ezYxpsf%lkp@intel.com> (raw)
In-Reply-To: <20200508074753.10362-1-giraffesnn123@gmail.com>
[-- Attachment #1: Type: text/plain, Size: 20431 bytes --]
Hi Yongbo,
Thank you for the patch! Yet something to improve:
[auto build test ERROR on asoc/for-next]
[also build test ERROR on v5.7-rc4 next-20200508]
[if your patch is applied to the wrong git tree, please drop us a note to help
improve the system. BTW, we also suggest to use '--base' option to specify the
base tree in git format-patch, please see https://stackoverflow.com/a/37406982]
url: https://github.com/0day-ci/linux/commits/Yongbo-Zhang/ASoC-rsnd-add-interrupt-support-for-SSI-BUSIF-buffer/20200509-035713
base: https://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound.git for-next
config: arm-defconfig (attached as .config)
compiler: clang version 11.0.0 (https://github.com/llvm/llvm-project 6d2a66b10d458e34c852be46028092d2b46edc14)
reproduce:
wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
chmod +x ~/bin/make.cross
# install arm cross compiling tool for clang build
# apt-get install binutils-arm-linux-gnueabi
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross ARCH=arm
If you fix the issue, kindly add following tag as appropriate
Reported-by: kbuild test robot <lkp@intel.com>
All errors (new ones prefixed by >>):
>> sound/soc/sh/rcar/ssi.c:600:1: error: function definition is not allowed here
{
^
sound/soc/sh/rcar/ssi.c:618:1: error: function definition is not allowed here
{
^
sound/soc/sh/rcar/ssi.c:651:1: error: function definition is not allowed here
{
^
sound/soc/sh/rcar/ssi.c:696:1: error: function definition is not allowed here
{
^
>> sound/soc/sh/rcar/ssi.c:734:1: error: function declared in block scope cannot have 'static' storage class
static bool rsnd_ssi_pio_interrupt(struct rsnd_mod *mod,
^
sound/soc/sh/rcar/ssi.c:738:1: error: function definition is not allowed here
{
^
sound/soc/sh/rcar/ssi.c:830:1: error: function definition is not allowed here
{
^
sound/soc/sh/rcar/ssi.c:841:1: error: function definition is not allowed here
{
^
sound/soc/sh/rcar/ssi.c:878:1: error: function definition is not allowed here
{
^
sound/soc/sh/rcar/ssi.c:909:1: error: function definition is not allowed here
{
^
sound/soc/sh/rcar/ssi.c:923:1: error: function definition is not allowed here
{
^
sound/soc/sh/rcar/ssi.c:966:1: error: function definition is not allowed here
{
^
sound/soc/sh/rcar/ssi.c:989:1: error: function definition is not allowed here
{
^
sound/soc/sh/rcar/ssi.c:1033:1: error: function definition is not allowed here
{
^
sound/soc/sh/rcar/ssi.c:1051:1: error: function definition is not allowed here
{
^
sound/soc/sh/rcar/ssi.c:1063:1: error: function definition is not allowed here
{
^
>> sound/soc/sh/rcar/ssi.c:1069:12: error: use of undeclared identifier 'rsnd_ssi_common_probe'
.probe = rsnd_ssi_common_probe,
^
>> sound/soc/sh/rcar/ssi.c:1070:13: error: use of undeclared identifier 'rsnd_ssi_common_remove'
.remove = rsnd_ssi_common_remove,
^
>> sound/soc/sh/rcar/ssi.c:1071:11: error: use of undeclared identifier 'rsnd_ssi_pio_init'
.init = rsnd_ssi_pio_init,
^
fatal error: too many errors emitted, stopping now [-ferror-limit=]
20 errors generated.
vim +600 sound/soc/sh/rcar/ssi.c
ae5c322303fff5 Kuninori Morimoto 2013-07-21 595
919567d914b3c1 Kuninori Morimoto 2015-04-10 596 static int rsnd_ssi_hw_params(struct rsnd_mod *mod,
2c0fac19de2cd7 Kuninori Morimoto 2015-06-15 597 struct rsnd_dai_stream *io,
919567d914b3c1 Kuninori Morimoto 2015-04-10 598 struct snd_pcm_substream *substream,
919567d914b3c1 Kuninori Morimoto 2015-04-10 599 struct snd_pcm_hw_params *params)
919567d914b3c1 Kuninori Morimoto 2015-04-10 @600 {
fb2815f44a9eb3 Dragos Tarcatu 2018-09-03 601 struct rsnd_dai *rdai = rsnd_io_to_rdai(io);
fb2815f44a9eb3 Dragos Tarcatu 2018-09-03 602 unsigned int fmt_width = snd_pcm_format_width(params_format(params));
fb2815f44a9eb3 Dragos Tarcatu 2018-09-03 603
fb2815f44a9eb3 Dragos Tarcatu 2018-09-03 604 if (fmt_width > rdai->chan_width) {
fb2815f44a9eb3 Dragos Tarcatu 2018-09-03 605 struct rsnd_priv *priv = rsnd_io_to_priv(io);
fb2815f44a9eb3 Dragos Tarcatu 2018-09-03 606 struct device *dev = rsnd_priv_to_dev(priv);
fb2815f44a9eb3 Dragos Tarcatu 2018-09-03 607
fb2815f44a9eb3 Dragos Tarcatu 2018-09-03 608 dev_err(dev, "invalid combination of slot-width and format-data-width\n");
fb2815f44a9eb3 Dragos Tarcatu 2018-09-03 609 return -EINVAL;
fb2815f44a9eb3 Dragos Tarcatu 2018-09-03 610 }
919567d914b3c1 Kuninori Morimoto 2015-04-10 611
919567d914b3c1 Kuninori Morimoto 2015-04-10 612 return 0;
919567d914b3c1 Kuninori Morimoto 2015-04-10 613 }
919567d914b3c1 Kuninori Morimoto 2015-04-10 614
6a25c8da00284f Kuninori Morimoto 2016-01-26 615 static int rsnd_ssi_start(struct rsnd_mod *mod,
2c0fac19de2cd7 Kuninori Morimoto 2015-06-15 616 struct rsnd_dai_stream *io,
690602fcd85385 Kuninori Morimoto 2015-01-15 617 struct rsnd_priv *priv)
4e7d606cd52aa8 Kuninori Morimoto 2014-11-27 @618 {
597b046f0d99b0 Kuninori Morimoto 2017-08-08 619 struct rsnd_ssi *ssi = rsnd_mod_to_ssi(mod);
597b046f0d99b0 Kuninori Morimoto 2017-08-08 620
fd9adcfdc1434f Kuninori Morimoto 2016-02-18 621 if (!rsnd_ssi_is_run_mods(mod, io))
fd9adcfdc1434f Kuninori Morimoto 2016-02-18 622 return 0;
fd9adcfdc1434f Kuninori Morimoto 2016-02-18 623
b4c83b17155781 Kuninori Morimoto 2015-12-17 624 /*
b4c83b17155781 Kuninori Morimoto 2015-12-17 625 * EN will be set via SSIU :: SSI_CONTROL
b4c83b17155781 Kuninori Morimoto 2015-12-17 626 * if Multi channel mode
b4c83b17155781 Kuninori Morimoto 2015-12-17 627 */
4f5c634d58e719 Kuninori Morimoto 2016-02-18 628 if (rsnd_ssi_multi_slaves_runtime(io))
0dc6bf75023a42 Kuninori Morimoto 2016-02-18 629 return 0;
4e7d606cd52aa8 Kuninori Morimoto 2014-11-27 630
597b046f0d99b0 Kuninori Morimoto 2017-08-08 631 /*
597b046f0d99b0 Kuninori Morimoto 2017-08-08 632 * EN is for data output.
597b046f0d99b0 Kuninori Morimoto 2017-08-08 633 * SSI parent EN is not needed.
597b046f0d99b0 Kuninori Morimoto 2017-08-08 634 */
0c258657ddfe81 Matthias Blankertz 2020-04-17 635 if (rsnd_ssi_is_parent(mod, io))
597b046f0d99b0 Kuninori Morimoto 2017-08-08 636 return 0;
597b046f0d99b0 Kuninori Morimoto 2017-08-08 637
597b046f0d99b0 Kuninori Morimoto 2017-08-08 638 ssi->cr_en = EN;
597b046f0d99b0 Kuninori Morimoto 2017-08-08 639
597b046f0d99b0 Kuninori Morimoto 2017-08-08 640 rsnd_mod_write(mod, SSICR, ssi->cr_own |
597b046f0d99b0 Kuninori Morimoto 2017-08-08 641 ssi->cr_clk |
597b046f0d99b0 Kuninori Morimoto 2017-08-08 642 ssi->cr_mode |
597b046f0d99b0 Kuninori Morimoto 2017-08-08 643 ssi->cr_en);
4e7d606cd52aa8 Kuninori Morimoto 2014-11-27 644
4e7d606cd52aa8 Kuninori Morimoto 2014-11-27 645 return 0;
4e7d606cd52aa8 Kuninori Morimoto 2014-11-27 646 }
4e7d606cd52aa8 Kuninori Morimoto 2014-11-27 647
6a25c8da00284f Kuninori Morimoto 2016-01-26 648 static int rsnd_ssi_stop(struct rsnd_mod *mod,
e7d850dd10f4e6 Kuninori Morimoto 2015-10-26 649 struct rsnd_dai_stream *io,
e7d850dd10f4e6 Kuninori Morimoto 2015-10-26 650 struct rsnd_priv *priv)
e7d850dd10f4e6 Kuninori Morimoto 2015-10-26 651 {
6a25c8da00284f Kuninori Morimoto 2016-01-26 652 struct rsnd_ssi *ssi = rsnd_mod_to_ssi(mod);
6a25c8da00284f Kuninori Morimoto 2016-01-26 653 u32 cr;
6a25c8da00284f Kuninori Morimoto 2016-01-26 654
fd9adcfdc1434f Kuninori Morimoto 2016-02-18 655 if (!rsnd_ssi_is_run_mods(mod, io))
fd9adcfdc1434f Kuninori Morimoto 2016-02-18 656 return 0;
fd9adcfdc1434f Kuninori Morimoto 2016-02-18 657
0c258657ddfe81 Matthias Blankertz 2020-04-17 658 if (rsnd_ssi_is_parent(mod, io))
6a25c8da00284f Kuninori Morimoto 2016-01-26 659 return 0;
4e7d606cd52aa8 Kuninori Morimoto 2014-11-27 660
e7d850dd10f4e6 Kuninori Morimoto 2015-10-26 661 cr = ssi->cr_own |
e7d850dd10f4e6 Kuninori Morimoto 2015-10-26 662 ssi->cr_clk;
e7d850dd10f4e6 Kuninori Morimoto 2015-10-26 663
ce548931207c0d Kuninori Morimoto 2017-10-31 664 /*
ce548931207c0d Kuninori Morimoto 2017-10-31 665 * disable all IRQ,
ce548931207c0d Kuninori Morimoto 2017-10-31 666 * Playback: Wait all data was sent
ce548931207c0d Kuninori Morimoto 2017-10-31 667 * Capture: It might not receave data. Do nothing
ce548931207c0d Kuninori Morimoto 2017-10-31 668 */
ce548931207c0d Kuninori Morimoto 2017-10-31 669 if (rsnd_io_is_play(io)) {
54cb6221688660 Matthias Blankertz 2020-04-17 670 rsnd_mod_write(mod, SSICR, cr | ssi->cr_en);
e7d850dd10f4e6 Kuninori Morimoto 2015-10-26 671 rsnd_ssi_status_check(mod, DIRQ);
ce548931207c0d Kuninori Morimoto 2017-10-31 672 }
e7d850dd10f4e6 Kuninori Morimoto 2015-10-26 673
54cb6221688660 Matthias Blankertz 2020-04-17 674 /* In multi-SSI mode, stop is performed by setting ssi0129 in
54cb6221688660 Matthias Blankertz 2020-04-17 675 * SSI_CONTROL to 0 (in rsnd_ssio_stop_gen2). Do nothing here.
54cb6221688660 Matthias Blankertz 2020-04-17 676 */
54cb6221688660 Matthias Blankertz 2020-04-17 677 if (rsnd_ssi_multi_slaves_runtime(io))
54cb6221688660 Matthias Blankertz 2020-04-17 678 return 0;
54cb6221688660 Matthias Blankertz 2020-04-17 679
e7d850dd10f4e6 Kuninori Morimoto 2015-10-26 680 /*
e7d850dd10f4e6 Kuninori Morimoto 2015-10-26 681 * disable SSI,
e7d850dd10f4e6 Kuninori Morimoto 2015-10-26 682 * and, wait idle state
e7d850dd10f4e6 Kuninori Morimoto 2015-10-26 683 */
e7d850dd10f4e6 Kuninori Morimoto 2015-10-26 684 rsnd_mod_write(mod, SSICR, cr); /* disabled all */
e7d850dd10f4e6 Kuninori Morimoto 2015-10-26 685 rsnd_ssi_status_check(mod, IIRQ);
4e7d606cd52aa8 Kuninori Morimoto 2014-11-27 686
597b046f0d99b0 Kuninori Morimoto 2017-08-08 687 ssi->cr_en = 0;
597b046f0d99b0 Kuninori Morimoto 2017-08-08 688
e7d850dd10f4e6 Kuninori Morimoto 2015-10-26 689 return 0;
e7d850dd10f4e6 Kuninori Morimoto 2015-10-26 690 }
4e7d606cd52aa8 Kuninori Morimoto 2014-11-27 691
615fb6c7b13b7f Kuninori Morimoto 2016-02-18 692 static int rsnd_ssi_irq(struct rsnd_mod *mod,
615fb6c7b13b7f Kuninori Morimoto 2016-02-18 693 struct rsnd_dai_stream *io,
615fb6c7b13b7f Kuninori Morimoto 2016-02-18 694 struct rsnd_priv *priv,
615fb6c7b13b7f Kuninori Morimoto 2016-02-18 695 int enable)
615fb6c7b13b7f Kuninori Morimoto 2016-02-18 696 {
615fb6c7b13b7f Kuninori Morimoto 2016-02-18 697 u32 val = 0;
391d452251464b Yongbo Zhang 2020-05-08 698 int is_tdm, is_tdm_split;
391d452251464b Yongbo Zhang 2020-05-08 699 int id = rsnd_mod_id(mod);
391d452251464b Yongbo Zhang 2020-05-08 700
391d452251464b Yongbo Zhang 2020-05-08 701 is_tdm = rsnd_runtime_is_tdm(io);
391d452251464b Yongbo Zhang 2020-05-08 702 is_tdm_split = rsnd_runtime_is_tdm_split(io);
615fb6c7b13b7f Kuninori Morimoto 2016-02-18 703
615fb6c7b13b7f Kuninori Morimoto 2016-02-18 704 if (rsnd_is_gen1(priv))
615fb6c7b13b7f Kuninori Morimoto 2016-02-18 705 return 0;
615fb6c7b13b7f Kuninori Morimoto 2016-02-18 706
0c258657ddfe81 Matthias Blankertz 2020-04-17 707 if (rsnd_ssi_is_parent(mod, io))
615fb6c7b13b7f Kuninori Morimoto 2016-02-18 708 return 0;
615fb6c7b13b7f Kuninori Morimoto 2016-02-18 709
fd9adcfdc1434f Kuninori Morimoto 2016-02-18 710 if (!rsnd_ssi_is_run_mods(mod, io))
fd9adcfdc1434f Kuninori Morimoto 2016-02-18 711 return 0;
fd9adcfdc1434f Kuninori Morimoto 2016-02-18 712
615fb6c7b13b7f Kuninori Morimoto 2016-02-18 713 if (enable)
615fb6c7b13b7f Kuninori Morimoto 2016-02-18 714 val = rsnd_ssi_is_dma_mode(mod) ? 0x0e000000 : 0x0f000000;
615fb6c7b13b7f Kuninori Morimoto 2016-02-18 715
391d452251464b Yongbo Zhang 2020-05-08 716 if (is_tdm || is_tdm_split) {
391d452251464b Yongbo Zhang 2020-05-08 717 switch (id) {
391d452251464b Yongbo Zhang 2020-05-08 718 case 0:
391d452251464b Yongbo Zhang 2020-05-08 719 case 1:
391d452251464b Yongbo Zhang 2020-05-08 720 case 2:
391d452251464b Yongbo Zhang 2020-05-08 721 case 3:
391d452251464b Yongbo Zhang 2020-05-08 722 case 4:
391d452251464b Yongbo Zhang 2020-05-08 723 case 9:
391d452251464b Yongbo Zhang 2020-05-08 724 val |= 0xff00;
391d452251464b Yongbo Zhang 2020-05-08 725 break;
391d452251464b Yongbo Zhang 2020-05-08 726 }
391d452251464b Yongbo Zhang 2020-05-08 727 }
391d452251464b Yongbo Zhang 2020-05-08 728
615fb6c7b13b7f Kuninori Morimoto 2016-02-18 729 rsnd_mod_write(mod, SSI_INT_ENABLE, val);
615fb6c7b13b7f Kuninori Morimoto 2016-02-18 730
615fb6c7b13b7f Kuninori Morimoto 2016-02-18 731 return 0;
615fb6c7b13b7f Kuninori Morimoto 2016-02-18 732 }
615fb6c7b13b7f Kuninori Morimoto 2016-02-18 733
d8d9b9730cd62c Kuninori Morimoto 2017-12-11 @734 static bool rsnd_ssi_pio_interrupt(struct rsnd_mod *mod,
d8d9b9730cd62c Kuninori Morimoto 2017-12-11 735 struct rsnd_dai_stream *io);
bfc0cfe6b7acb1 Kuninori Morimoto 2015-06-15 736 static void __rsnd_ssi_interrupt(struct rsnd_mod *mod,
bfc0cfe6b7acb1 Kuninori Morimoto 2015-06-15 737 struct rsnd_dai_stream *io)
ae5c322303fff5 Kuninori Morimoto 2013-07-21 738 {
690602fcd85385 Kuninori Morimoto 2015-01-15 739 struct rsnd_priv *priv = rsnd_mod_to_priv(mod);
2b62786951ca38 Kuninori Morimoto 2018-02-13 740 struct device *dev = rsnd_priv_to_dev(priv);
765ae7c8dda7d0 Kuninori Morimoto 2015-01-15 741 int is_dma = rsnd_ssi_is_dma_mode(mod);
02299d9875bab5 Kuninori Morimoto 2015-05-21 742 u32 status;
75defee0f1b3fc Kuninori Morimoto 2015-06-15 743 bool elapsed = false;
6a25c8da00284f Kuninori Morimoto 2016-01-26 744 bool stop = false;
391d452251464b Yongbo Zhang 2020-05-08 745 int is_tdm, is_tdm_split;
391d452251464b Yongbo Zhang 2020-05-08 746
391d452251464b Yongbo Zhang 2020-05-08 747 is_tdm = rsnd_runtime_is_tdm(io);
391d452251464b Yongbo Zhang 2020-05-08 748 is_tdm_split = rsnd_runtime_is_tdm_split(io);
02299d9875bab5 Kuninori Morimoto 2015-05-21 749
02299d9875bab5 Kuninori Morimoto 2015-05-21 750 spin_lock(&priv->lock);
ae5c322303fff5 Kuninori Morimoto 2013-07-21 751
02299d9875bab5 Kuninori Morimoto 2015-05-21 752 /* ignore all cases if not working */
d5bbe7de563ccc Kuninori Morimoto 2015-06-15 753 if (!rsnd_io_is_working(io))
02299d9875bab5 Kuninori Morimoto 2015-05-21 754 goto rsnd_ssi_interrupt_out;
02299d9875bab5 Kuninori Morimoto 2015-05-21 755
6a25c8da00284f Kuninori Morimoto 2016-01-26 756 status = rsnd_ssi_status_get(mod);
4e7d606cd52aa8 Kuninori Morimoto 2014-11-27 757
4e7d606cd52aa8 Kuninori Morimoto 2014-11-27 758 /* PIO only */
d8d9b9730cd62c Kuninori Morimoto 2017-12-11 759 if (!is_dma && (status & DIRQ))
d8d9b9730cd62c Kuninori Morimoto 2017-12-11 760 elapsed = rsnd_ssi_pio_interrupt(mod, io);
ae5c322303fff5 Kuninori Morimoto 2013-07-21 761
12927a8f802642 Kuninori Morimoto 2015-06-15 762 /* DMA only */
2b62786951ca38 Kuninori Morimoto 2018-02-13 763 if (is_dma && (status & (UIRQ | OIRQ))) {
c0ea089dbad47a Kuninori Morimoto 2018-10-30 764 rsnd_dbg_irq_status(dev, "%s err status : 0x%08x\n",
c0ea089dbad47a Kuninori Morimoto 2018-10-30 765 rsnd_mod_name(mod), status);
2b62786951ca38 Kuninori Morimoto 2018-02-13 766
6a25c8da00284f Kuninori Morimoto 2016-01-26 767 stop = true;
2b62786951ca38 Kuninori Morimoto 2018-02-13 768 }
69e32a58bde674 Kuninori Morimoto 2015-10-26 769
391d452251464b Yongbo Zhang 2020-05-08 770 status = 0;
391d452251464b Yongbo Zhang 2020-05-08 771
391d452251464b Yongbo Zhang 2020-05-08 772 if (is_tdm || is_tdm_split) {
391d452251464b Yongbo Zhang 2020-05-08 773 switch (id) {
391d452251464b Yongbo Zhang 2020-05-08 774 case 0:
391d452251464b Yongbo Zhang 2020-05-08 775 case 1:
391d452251464b Yongbo Zhang 2020-05-08 776 case 2:
391d452251464b Yongbo Zhang 2020-05-08 777 case 3:
391d452251464b Yongbo Zhang 2020-05-08 778 case 4:
391d452251464b Yongbo Zhang 2020-05-08 779 for (i = 0; i < 4; i++) {
391d452251464b Yongbo Zhang 2020-05-08 780 status = rsnd_mod_read(mod,
391d452251464b Yongbo Zhang 2020-05-08 781 SSI_SYS_STATUS(i * 2));
391d452251464b Yongbo Zhang 2020-05-08 782 status &= 0xf << (id * 4);
391d452251464b Yongbo Zhang 2020-05-08 783
391d452251464b Yongbo Zhang 2020-05-08 784 if (status) {
391d452251464b Yongbo Zhang 2020-05-08 785 rsnd_dbg_irq_status(dev,
391d452251464b Yongbo Zhang 2020-05-08 786 "%s err status : 0x%08x\n",
391d452251464b Yongbo Zhang 2020-05-08 787 rsnd_mod_name(mod), status);
391d452251464b Yongbo Zhang 2020-05-08 788 rsnd_mod_write(mod,
391d452251464b Yongbo Zhang 2020-05-08 789 SSI_SYS_STATUS(i * 2),
391d452251464b Yongbo Zhang 2020-05-08 790 0xf << (id * 4));
391d452251464b Yongbo Zhang 2020-05-08 791 stop = true;
391d452251464b Yongbo Zhang 2020-05-08 792 break;
391d452251464b Yongbo Zhang 2020-05-08 793 }
391d452251464b Yongbo Zhang 2020-05-08 794 }
391d452251464b Yongbo Zhang 2020-05-08 795 break;
391d452251464b Yongbo Zhang 2020-05-08 796 case 9:
391d452251464b Yongbo Zhang 2020-05-08 797 for (i = 0; i < 4; i++) {
391d452251464b Yongbo Zhang 2020-05-08 798 status = rsnd_mod_write(mod,
391d452251464b Yongbo Zhang 2020-05-08 799 SSI_SYS_STATUS((i * 2) + 1));
391d452251464b Yongbo Zhang 2020-05-08 800 status &= 0xf << 4;
391d452251464b Yongbo Zhang 2020-05-08 801
391d452251464b Yongbo Zhang 2020-05-08 802 if (status) {
391d452251464b Yongbo Zhang 2020-05-08 803 rsnd_dbg_irq_status(dev,
391d452251464b Yongbo Zhang 2020-05-08 804 "%s err status : 0x%08x\n",
391d452251464b Yongbo Zhang 2020-05-08 805 rsnd_mod_name(mod), status);
391d452251464b Yongbo Zhang 2020-05-08 806 rsnd_mod_write(mod,
391d452251464b Yongbo Zhang 2020-05-08 807 SSI_SYS_STATUS((i * 2) + 1),
391d452251464b Yongbo Zhang 2020-05-08 808 0xf << 4);
391d452251464b Yongbo Zhang 2020-05-08 809 stop = true;
391d452251464b Yongbo Zhang 2020-05-08 810 break;
391d452251464b Yongbo Zhang 2020-05-08 811 }
391d452251464b Yongbo Zhang 2020-05-08 812 }
391d452251464b Yongbo Zhang 2020-05-08 813 break;
391d452251464b Yongbo Zhang 2020-05-08 814 }
391d452251464b Yongbo Zhang 2020-05-08 815 }
391d452251464b Yongbo Zhang 2020-05-08 816
5342dff2326393 Kuninori Morimoto 2015-11-26 817 rsnd_ssi_status_clear(mod);
02299d9875bab5 Kuninori Morimoto 2015-05-21 818 rsnd_ssi_interrupt_out:
02299d9875bab5 Kuninori Morimoto 2015-05-21 819 spin_unlock(&priv->lock);
02299d9875bab5 Kuninori Morimoto 2015-05-21 820
75defee0f1b3fc Kuninori Morimoto 2015-06-15 821 if (elapsed)
75defee0f1b3fc Kuninori Morimoto 2015-06-15 822 rsnd_dai_period_elapsed(io);
6a25c8da00284f Kuninori Morimoto 2016-01-26 823
6a25c8da00284f Kuninori Morimoto 2016-01-26 824 if (stop)
6a25c8da00284f Kuninori Morimoto 2016-01-26 825 snd_pcm_stop_xrun(io->substream);
6a25c8da00284f Kuninori Morimoto 2016-01-26 826
:::::: The code at line 600 was first introduced by commit
:::::: 919567d914b3c134e60c01db72a03a0adc5f41b9 ASoC: rsnd: make sure SSI parent/child uses same number of sound channel.
:::::: TO: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
:::::: CC: Mark Brown <broonie@kernel.org>
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
[-- Attachment #2: .config.gz --]
[-- Type: application/gzip, Size: 51794 bytes --]
WARNING: multiple messages have this Message-ID (diff)
From: kbuild test robot <lkp@intel.com>
To: kbuild-all@lists.01.org
Subject: Re: [PATCH] ASoC: rsnd: add interrupt support for SSI BUSIF buffer
Date: Sat, 09 May 2020 07:56:36 +0800 [thread overview]
Message-ID: <202005090732.6ezYxpsf%lkp@intel.com> (raw)
In-Reply-To: <20200508074753.10362-1-giraffesnn123@gmail.com>
[-- Attachment #1: Type: text/plain, Size: 20764 bytes --]
Hi Yongbo,
Thank you for the patch! Yet something to improve:
[auto build test ERROR on asoc/for-next]
[also build test ERROR on v5.7-rc4 next-20200508]
[if your patch is applied to the wrong git tree, please drop us a note to help
improve the system. BTW, we also suggest to use '--base' option to specify the
base tree in git format-patch, please see https://stackoverflow.com/a/37406982]
url: https://github.com/0day-ci/linux/commits/Yongbo-Zhang/ASoC-rsnd-add-interrupt-support-for-SSI-BUSIF-buffer/20200509-035713
base: https://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound.git for-next
config: arm-defconfig (attached as .config)
compiler: clang version 11.0.0 (https://github.com/llvm/llvm-project 6d2a66b10d458e34c852be46028092d2b46edc14)
reproduce:
wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
chmod +x ~/bin/make.cross
# install arm cross compiling tool for clang build
# apt-get install binutils-arm-linux-gnueabi
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross ARCH=arm
If you fix the issue, kindly add following tag as appropriate
Reported-by: kbuild test robot <lkp@intel.com>
All errors (new ones prefixed by >>):
>> sound/soc/sh/rcar/ssi.c:600:1: error: function definition is not allowed here
{
^
sound/soc/sh/rcar/ssi.c:618:1: error: function definition is not allowed here
{
^
sound/soc/sh/rcar/ssi.c:651:1: error: function definition is not allowed here
{
^
sound/soc/sh/rcar/ssi.c:696:1: error: function definition is not allowed here
{
^
>> sound/soc/sh/rcar/ssi.c:734:1: error: function declared in block scope cannot have 'static' storage class
static bool rsnd_ssi_pio_interrupt(struct rsnd_mod *mod,
^
sound/soc/sh/rcar/ssi.c:738:1: error: function definition is not allowed here
{
^
sound/soc/sh/rcar/ssi.c:830:1: error: function definition is not allowed here
{
^
sound/soc/sh/rcar/ssi.c:841:1: error: function definition is not allowed here
{
^
sound/soc/sh/rcar/ssi.c:878:1: error: function definition is not allowed here
{
^
sound/soc/sh/rcar/ssi.c:909:1: error: function definition is not allowed here
{
^
sound/soc/sh/rcar/ssi.c:923:1: error: function definition is not allowed here
{
^
sound/soc/sh/rcar/ssi.c:966:1: error: function definition is not allowed here
{
^
sound/soc/sh/rcar/ssi.c:989:1: error: function definition is not allowed here
{
^
sound/soc/sh/rcar/ssi.c:1033:1: error: function definition is not allowed here
{
^
sound/soc/sh/rcar/ssi.c:1051:1: error: function definition is not allowed here
{
^
sound/soc/sh/rcar/ssi.c:1063:1: error: function definition is not allowed here
{
^
>> sound/soc/sh/rcar/ssi.c:1069:12: error: use of undeclared identifier 'rsnd_ssi_common_probe'
.probe = rsnd_ssi_common_probe,
^
>> sound/soc/sh/rcar/ssi.c:1070:13: error: use of undeclared identifier 'rsnd_ssi_common_remove'
.remove = rsnd_ssi_common_remove,
^
>> sound/soc/sh/rcar/ssi.c:1071:11: error: use of undeclared identifier 'rsnd_ssi_pio_init'
.init = rsnd_ssi_pio_init,
^
fatal error: too many errors emitted, stopping now [-ferror-limit=]
20 errors generated.
vim +600 sound/soc/sh/rcar/ssi.c
ae5c322303fff5 Kuninori Morimoto 2013-07-21 595
919567d914b3c1 Kuninori Morimoto 2015-04-10 596 static int rsnd_ssi_hw_params(struct rsnd_mod *mod,
2c0fac19de2cd7 Kuninori Morimoto 2015-06-15 597 struct rsnd_dai_stream *io,
919567d914b3c1 Kuninori Morimoto 2015-04-10 598 struct snd_pcm_substream *substream,
919567d914b3c1 Kuninori Morimoto 2015-04-10 599 struct snd_pcm_hw_params *params)
919567d914b3c1 Kuninori Morimoto 2015-04-10 @600 {
fb2815f44a9eb3 Dragos Tarcatu 2018-09-03 601 struct rsnd_dai *rdai = rsnd_io_to_rdai(io);
fb2815f44a9eb3 Dragos Tarcatu 2018-09-03 602 unsigned int fmt_width = snd_pcm_format_width(params_format(params));
fb2815f44a9eb3 Dragos Tarcatu 2018-09-03 603
fb2815f44a9eb3 Dragos Tarcatu 2018-09-03 604 if (fmt_width > rdai->chan_width) {
fb2815f44a9eb3 Dragos Tarcatu 2018-09-03 605 struct rsnd_priv *priv = rsnd_io_to_priv(io);
fb2815f44a9eb3 Dragos Tarcatu 2018-09-03 606 struct device *dev = rsnd_priv_to_dev(priv);
fb2815f44a9eb3 Dragos Tarcatu 2018-09-03 607
fb2815f44a9eb3 Dragos Tarcatu 2018-09-03 608 dev_err(dev, "invalid combination of slot-width and format-data-width\n");
fb2815f44a9eb3 Dragos Tarcatu 2018-09-03 609 return -EINVAL;
fb2815f44a9eb3 Dragos Tarcatu 2018-09-03 610 }
919567d914b3c1 Kuninori Morimoto 2015-04-10 611
919567d914b3c1 Kuninori Morimoto 2015-04-10 612 return 0;
919567d914b3c1 Kuninori Morimoto 2015-04-10 613 }
919567d914b3c1 Kuninori Morimoto 2015-04-10 614
6a25c8da00284f Kuninori Morimoto 2016-01-26 615 static int rsnd_ssi_start(struct rsnd_mod *mod,
2c0fac19de2cd7 Kuninori Morimoto 2015-06-15 616 struct rsnd_dai_stream *io,
690602fcd85385 Kuninori Morimoto 2015-01-15 617 struct rsnd_priv *priv)
4e7d606cd52aa8 Kuninori Morimoto 2014-11-27 @618 {
597b046f0d99b0 Kuninori Morimoto 2017-08-08 619 struct rsnd_ssi *ssi = rsnd_mod_to_ssi(mod);
597b046f0d99b0 Kuninori Morimoto 2017-08-08 620
fd9adcfdc1434f Kuninori Morimoto 2016-02-18 621 if (!rsnd_ssi_is_run_mods(mod, io))
fd9adcfdc1434f Kuninori Morimoto 2016-02-18 622 return 0;
fd9adcfdc1434f Kuninori Morimoto 2016-02-18 623
b4c83b17155781 Kuninori Morimoto 2015-12-17 624 /*
b4c83b17155781 Kuninori Morimoto 2015-12-17 625 * EN will be set via SSIU :: SSI_CONTROL
b4c83b17155781 Kuninori Morimoto 2015-12-17 626 * if Multi channel mode
b4c83b17155781 Kuninori Morimoto 2015-12-17 627 */
4f5c634d58e719 Kuninori Morimoto 2016-02-18 628 if (rsnd_ssi_multi_slaves_runtime(io))
0dc6bf75023a42 Kuninori Morimoto 2016-02-18 629 return 0;
4e7d606cd52aa8 Kuninori Morimoto 2014-11-27 630
597b046f0d99b0 Kuninori Morimoto 2017-08-08 631 /*
597b046f0d99b0 Kuninori Morimoto 2017-08-08 632 * EN is for data output.
597b046f0d99b0 Kuninori Morimoto 2017-08-08 633 * SSI parent EN is not needed.
597b046f0d99b0 Kuninori Morimoto 2017-08-08 634 */
0c258657ddfe81 Matthias Blankertz 2020-04-17 635 if (rsnd_ssi_is_parent(mod, io))
597b046f0d99b0 Kuninori Morimoto 2017-08-08 636 return 0;
597b046f0d99b0 Kuninori Morimoto 2017-08-08 637
597b046f0d99b0 Kuninori Morimoto 2017-08-08 638 ssi->cr_en = EN;
597b046f0d99b0 Kuninori Morimoto 2017-08-08 639
597b046f0d99b0 Kuninori Morimoto 2017-08-08 640 rsnd_mod_write(mod, SSICR, ssi->cr_own |
597b046f0d99b0 Kuninori Morimoto 2017-08-08 641 ssi->cr_clk |
597b046f0d99b0 Kuninori Morimoto 2017-08-08 642 ssi->cr_mode |
597b046f0d99b0 Kuninori Morimoto 2017-08-08 643 ssi->cr_en);
4e7d606cd52aa8 Kuninori Morimoto 2014-11-27 644
4e7d606cd52aa8 Kuninori Morimoto 2014-11-27 645 return 0;
4e7d606cd52aa8 Kuninori Morimoto 2014-11-27 646 }
4e7d606cd52aa8 Kuninori Morimoto 2014-11-27 647
6a25c8da00284f Kuninori Morimoto 2016-01-26 648 static int rsnd_ssi_stop(struct rsnd_mod *mod,
e7d850dd10f4e6 Kuninori Morimoto 2015-10-26 649 struct rsnd_dai_stream *io,
e7d850dd10f4e6 Kuninori Morimoto 2015-10-26 650 struct rsnd_priv *priv)
e7d850dd10f4e6 Kuninori Morimoto 2015-10-26 651 {
6a25c8da00284f Kuninori Morimoto 2016-01-26 652 struct rsnd_ssi *ssi = rsnd_mod_to_ssi(mod);
6a25c8da00284f Kuninori Morimoto 2016-01-26 653 u32 cr;
6a25c8da00284f Kuninori Morimoto 2016-01-26 654
fd9adcfdc1434f Kuninori Morimoto 2016-02-18 655 if (!rsnd_ssi_is_run_mods(mod, io))
fd9adcfdc1434f Kuninori Morimoto 2016-02-18 656 return 0;
fd9adcfdc1434f Kuninori Morimoto 2016-02-18 657
0c258657ddfe81 Matthias Blankertz 2020-04-17 658 if (rsnd_ssi_is_parent(mod, io))
6a25c8da00284f Kuninori Morimoto 2016-01-26 659 return 0;
4e7d606cd52aa8 Kuninori Morimoto 2014-11-27 660
e7d850dd10f4e6 Kuninori Morimoto 2015-10-26 661 cr = ssi->cr_own |
e7d850dd10f4e6 Kuninori Morimoto 2015-10-26 662 ssi->cr_clk;
e7d850dd10f4e6 Kuninori Morimoto 2015-10-26 663
ce548931207c0d Kuninori Morimoto 2017-10-31 664 /*
ce548931207c0d Kuninori Morimoto 2017-10-31 665 * disable all IRQ,
ce548931207c0d Kuninori Morimoto 2017-10-31 666 * Playback: Wait all data was sent
ce548931207c0d Kuninori Morimoto 2017-10-31 667 * Capture: It might not receave data. Do nothing
ce548931207c0d Kuninori Morimoto 2017-10-31 668 */
ce548931207c0d Kuninori Morimoto 2017-10-31 669 if (rsnd_io_is_play(io)) {
54cb6221688660 Matthias Blankertz 2020-04-17 670 rsnd_mod_write(mod, SSICR, cr | ssi->cr_en);
e7d850dd10f4e6 Kuninori Morimoto 2015-10-26 671 rsnd_ssi_status_check(mod, DIRQ);
ce548931207c0d Kuninori Morimoto 2017-10-31 672 }
e7d850dd10f4e6 Kuninori Morimoto 2015-10-26 673
54cb6221688660 Matthias Blankertz 2020-04-17 674 /* In multi-SSI mode, stop is performed by setting ssi0129 in
54cb6221688660 Matthias Blankertz 2020-04-17 675 * SSI_CONTROL to 0 (in rsnd_ssio_stop_gen2). Do nothing here.
54cb6221688660 Matthias Blankertz 2020-04-17 676 */
54cb6221688660 Matthias Blankertz 2020-04-17 677 if (rsnd_ssi_multi_slaves_runtime(io))
54cb6221688660 Matthias Blankertz 2020-04-17 678 return 0;
54cb6221688660 Matthias Blankertz 2020-04-17 679
e7d850dd10f4e6 Kuninori Morimoto 2015-10-26 680 /*
e7d850dd10f4e6 Kuninori Morimoto 2015-10-26 681 * disable SSI,
e7d850dd10f4e6 Kuninori Morimoto 2015-10-26 682 * and, wait idle state
e7d850dd10f4e6 Kuninori Morimoto 2015-10-26 683 */
e7d850dd10f4e6 Kuninori Morimoto 2015-10-26 684 rsnd_mod_write(mod, SSICR, cr); /* disabled all */
e7d850dd10f4e6 Kuninori Morimoto 2015-10-26 685 rsnd_ssi_status_check(mod, IIRQ);
4e7d606cd52aa8 Kuninori Morimoto 2014-11-27 686
597b046f0d99b0 Kuninori Morimoto 2017-08-08 687 ssi->cr_en = 0;
597b046f0d99b0 Kuninori Morimoto 2017-08-08 688
e7d850dd10f4e6 Kuninori Morimoto 2015-10-26 689 return 0;
e7d850dd10f4e6 Kuninori Morimoto 2015-10-26 690 }
4e7d606cd52aa8 Kuninori Morimoto 2014-11-27 691
615fb6c7b13b7f Kuninori Morimoto 2016-02-18 692 static int rsnd_ssi_irq(struct rsnd_mod *mod,
615fb6c7b13b7f Kuninori Morimoto 2016-02-18 693 struct rsnd_dai_stream *io,
615fb6c7b13b7f Kuninori Morimoto 2016-02-18 694 struct rsnd_priv *priv,
615fb6c7b13b7f Kuninori Morimoto 2016-02-18 695 int enable)
615fb6c7b13b7f Kuninori Morimoto 2016-02-18 696 {
615fb6c7b13b7f Kuninori Morimoto 2016-02-18 697 u32 val = 0;
391d452251464b Yongbo Zhang 2020-05-08 698 int is_tdm, is_tdm_split;
391d452251464b Yongbo Zhang 2020-05-08 699 int id = rsnd_mod_id(mod);
391d452251464b Yongbo Zhang 2020-05-08 700
391d452251464b Yongbo Zhang 2020-05-08 701 is_tdm = rsnd_runtime_is_tdm(io);
391d452251464b Yongbo Zhang 2020-05-08 702 is_tdm_split = rsnd_runtime_is_tdm_split(io);
615fb6c7b13b7f Kuninori Morimoto 2016-02-18 703
615fb6c7b13b7f Kuninori Morimoto 2016-02-18 704 if (rsnd_is_gen1(priv))
615fb6c7b13b7f Kuninori Morimoto 2016-02-18 705 return 0;
615fb6c7b13b7f Kuninori Morimoto 2016-02-18 706
0c258657ddfe81 Matthias Blankertz 2020-04-17 707 if (rsnd_ssi_is_parent(mod, io))
615fb6c7b13b7f Kuninori Morimoto 2016-02-18 708 return 0;
615fb6c7b13b7f Kuninori Morimoto 2016-02-18 709
fd9adcfdc1434f Kuninori Morimoto 2016-02-18 710 if (!rsnd_ssi_is_run_mods(mod, io))
fd9adcfdc1434f Kuninori Morimoto 2016-02-18 711 return 0;
fd9adcfdc1434f Kuninori Morimoto 2016-02-18 712
615fb6c7b13b7f Kuninori Morimoto 2016-02-18 713 if (enable)
615fb6c7b13b7f Kuninori Morimoto 2016-02-18 714 val = rsnd_ssi_is_dma_mode(mod) ? 0x0e000000 : 0x0f000000;
615fb6c7b13b7f Kuninori Morimoto 2016-02-18 715
391d452251464b Yongbo Zhang 2020-05-08 716 if (is_tdm || is_tdm_split) {
391d452251464b Yongbo Zhang 2020-05-08 717 switch (id) {
391d452251464b Yongbo Zhang 2020-05-08 718 case 0:
391d452251464b Yongbo Zhang 2020-05-08 719 case 1:
391d452251464b Yongbo Zhang 2020-05-08 720 case 2:
391d452251464b Yongbo Zhang 2020-05-08 721 case 3:
391d452251464b Yongbo Zhang 2020-05-08 722 case 4:
391d452251464b Yongbo Zhang 2020-05-08 723 case 9:
391d452251464b Yongbo Zhang 2020-05-08 724 val |= 0xff00;
391d452251464b Yongbo Zhang 2020-05-08 725 break;
391d452251464b Yongbo Zhang 2020-05-08 726 }
391d452251464b Yongbo Zhang 2020-05-08 727 }
391d452251464b Yongbo Zhang 2020-05-08 728
615fb6c7b13b7f Kuninori Morimoto 2016-02-18 729 rsnd_mod_write(mod, SSI_INT_ENABLE, val);
615fb6c7b13b7f Kuninori Morimoto 2016-02-18 730
615fb6c7b13b7f Kuninori Morimoto 2016-02-18 731 return 0;
615fb6c7b13b7f Kuninori Morimoto 2016-02-18 732 }
615fb6c7b13b7f Kuninori Morimoto 2016-02-18 733
d8d9b9730cd62c Kuninori Morimoto 2017-12-11 @734 static bool rsnd_ssi_pio_interrupt(struct rsnd_mod *mod,
d8d9b9730cd62c Kuninori Morimoto 2017-12-11 735 struct rsnd_dai_stream *io);
bfc0cfe6b7acb1 Kuninori Morimoto 2015-06-15 736 static void __rsnd_ssi_interrupt(struct rsnd_mod *mod,
bfc0cfe6b7acb1 Kuninori Morimoto 2015-06-15 737 struct rsnd_dai_stream *io)
ae5c322303fff5 Kuninori Morimoto 2013-07-21 738 {
690602fcd85385 Kuninori Morimoto 2015-01-15 739 struct rsnd_priv *priv = rsnd_mod_to_priv(mod);
2b62786951ca38 Kuninori Morimoto 2018-02-13 740 struct device *dev = rsnd_priv_to_dev(priv);
765ae7c8dda7d0 Kuninori Morimoto 2015-01-15 741 int is_dma = rsnd_ssi_is_dma_mode(mod);
02299d9875bab5 Kuninori Morimoto 2015-05-21 742 u32 status;
75defee0f1b3fc Kuninori Morimoto 2015-06-15 743 bool elapsed = false;
6a25c8da00284f Kuninori Morimoto 2016-01-26 744 bool stop = false;
391d452251464b Yongbo Zhang 2020-05-08 745 int is_tdm, is_tdm_split;
391d452251464b Yongbo Zhang 2020-05-08 746
391d452251464b Yongbo Zhang 2020-05-08 747 is_tdm = rsnd_runtime_is_tdm(io);
391d452251464b Yongbo Zhang 2020-05-08 748 is_tdm_split = rsnd_runtime_is_tdm_split(io);
02299d9875bab5 Kuninori Morimoto 2015-05-21 749
02299d9875bab5 Kuninori Morimoto 2015-05-21 750 spin_lock(&priv->lock);
ae5c322303fff5 Kuninori Morimoto 2013-07-21 751
02299d9875bab5 Kuninori Morimoto 2015-05-21 752 /* ignore all cases if not working */
d5bbe7de563ccc Kuninori Morimoto 2015-06-15 753 if (!rsnd_io_is_working(io))
02299d9875bab5 Kuninori Morimoto 2015-05-21 754 goto rsnd_ssi_interrupt_out;
02299d9875bab5 Kuninori Morimoto 2015-05-21 755
6a25c8da00284f Kuninori Morimoto 2016-01-26 756 status = rsnd_ssi_status_get(mod);
4e7d606cd52aa8 Kuninori Morimoto 2014-11-27 757
4e7d606cd52aa8 Kuninori Morimoto 2014-11-27 758 /* PIO only */
d8d9b9730cd62c Kuninori Morimoto 2017-12-11 759 if (!is_dma && (status & DIRQ))
d8d9b9730cd62c Kuninori Morimoto 2017-12-11 760 elapsed = rsnd_ssi_pio_interrupt(mod, io);
ae5c322303fff5 Kuninori Morimoto 2013-07-21 761
12927a8f802642 Kuninori Morimoto 2015-06-15 762 /* DMA only */
2b62786951ca38 Kuninori Morimoto 2018-02-13 763 if (is_dma && (status & (UIRQ | OIRQ))) {
c0ea089dbad47a Kuninori Morimoto 2018-10-30 764 rsnd_dbg_irq_status(dev, "%s err status : 0x%08x\n",
c0ea089dbad47a Kuninori Morimoto 2018-10-30 765 rsnd_mod_name(mod), status);
2b62786951ca38 Kuninori Morimoto 2018-02-13 766
6a25c8da00284f Kuninori Morimoto 2016-01-26 767 stop = true;
2b62786951ca38 Kuninori Morimoto 2018-02-13 768 }
69e32a58bde674 Kuninori Morimoto 2015-10-26 769
391d452251464b Yongbo Zhang 2020-05-08 770 status = 0;
391d452251464b Yongbo Zhang 2020-05-08 771
391d452251464b Yongbo Zhang 2020-05-08 772 if (is_tdm || is_tdm_split) {
391d452251464b Yongbo Zhang 2020-05-08 773 switch (id) {
391d452251464b Yongbo Zhang 2020-05-08 774 case 0:
391d452251464b Yongbo Zhang 2020-05-08 775 case 1:
391d452251464b Yongbo Zhang 2020-05-08 776 case 2:
391d452251464b Yongbo Zhang 2020-05-08 777 case 3:
391d452251464b Yongbo Zhang 2020-05-08 778 case 4:
391d452251464b Yongbo Zhang 2020-05-08 779 for (i = 0; i < 4; i++) {
391d452251464b Yongbo Zhang 2020-05-08 780 status = rsnd_mod_read(mod,
391d452251464b Yongbo Zhang 2020-05-08 781 SSI_SYS_STATUS(i * 2));
391d452251464b Yongbo Zhang 2020-05-08 782 status &= 0xf << (id * 4);
391d452251464b Yongbo Zhang 2020-05-08 783
391d452251464b Yongbo Zhang 2020-05-08 784 if (status) {
391d452251464b Yongbo Zhang 2020-05-08 785 rsnd_dbg_irq_status(dev,
391d452251464b Yongbo Zhang 2020-05-08 786 "%s err status : 0x%08x\n",
391d452251464b Yongbo Zhang 2020-05-08 787 rsnd_mod_name(mod), status);
391d452251464b Yongbo Zhang 2020-05-08 788 rsnd_mod_write(mod,
391d452251464b Yongbo Zhang 2020-05-08 789 SSI_SYS_STATUS(i * 2),
391d452251464b Yongbo Zhang 2020-05-08 790 0xf << (id * 4));
391d452251464b Yongbo Zhang 2020-05-08 791 stop = true;
391d452251464b Yongbo Zhang 2020-05-08 792 break;
391d452251464b Yongbo Zhang 2020-05-08 793 }
391d452251464b Yongbo Zhang 2020-05-08 794 }
391d452251464b Yongbo Zhang 2020-05-08 795 break;
391d452251464b Yongbo Zhang 2020-05-08 796 case 9:
391d452251464b Yongbo Zhang 2020-05-08 797 for (i = 0; i < 4; i++) {
391d452251464b Yongbo Zhang 2020-05-08 798 status = rsnd_mod_write(mod,
391d452251464b Yongbo Zhang 2020-05-08 799 SSI_SYS_STATUS((i * 2) + 1));
391d452251464b Yongbo Zhang 2020-05-08 800 status &= 0xf << 4;
391d452251464b Yongbo Zhang 2020-05-08 801
391d452251464b Yongbo Zhang 2020-05-08 802 if (status) {
391d452251464b Yongbo Zhang 2020-05-08 803 rsnd_dbg_irq_status(dev,
391d452251464b Yongbo Zhang 2020-05-08 804 "%s err status : 0x%08x\n",
391d452251464b Yongbo Zhang 2020-05-08 805 rsnd_mod_name(mod), status);
391d452251464b Yongbo Zhang 2020-05-08 806 rsnd_mod_write(mod,
391d452251464b Yongbo Zhang 2020-05-08 807 SSI_SYS_STATUS((i * 2) + 1),
391d452251464b Yongbo Zhang 2020-05-08 808 0xf << 4);
391d452251464b Yongbo Zhang 2020-05-08 809 stop = true;
391d452251464b Yongbo Zhang 2020-05-08 810 break;
391d452251464b Yongbo Zhang 2020-05-08 811 }
391d452251464b Yongbo Zhang 2020-05-08 812 }
391d452251464b Yongbo Zhang 2020-05-08 813 break;
391d452251464b Yongbo Zhang 2020-05-08 814 }
391d452251464b Yongbo Zhang 2020-05-08 815 }
391d452251464b Yongbo Zhang 2020-05-08 816
5342dff2326393 Kuninori Morimoto 2015-11-26 817 rsnd_ssi_status_clear(mod);
02299d9875bab5 Kuninori Morimoto 2015-05-21 818 rsnd_ssi_interrupt_out:
02299d9875bab5 Kuninori Morimoto 2015-05-21 819 spin_unlock(&priv->lock);
02299d9875bab5 Kuninori Morimoto 2015-05-21 820
75defee0f1b3fc Kuninori Morimoto 2015-06-15 821 if (elapsed)
75defee0f1b3fc Kuninori Morimoto 2015-06-15 822 rsnd_dai_period_elapsed(io);
6a25c8da00284f Kuninori Morimoto 2016-01-26 823
6a25c8da00284f Kuninori Morimoto 2016-01-26 824 if (stop)
6a25c8da00284f Kuninori Morimoto 2016-01-26 825 snd_pcm_stop_xrun(io->substream);
6a25c8da00284f Kuninori Morimoto 2016-01-26 826
:::::: The code at line 600 was first introduced by commit
:::::: 919567d914b3c134e60c01db72a03a0adc5f41b9 ASoC: rsnd: make sure SSI parent/child uses same number of sound channel.
:::::: TO: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
:::::: CC: Mark Brown <broonie@kernel.org>
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all(a)lists.01.org
[-- Attachment #2: config.gz --]
[-- Type: application/gzip, Size: 51794 bytes --]
next prev parent reply other threads:[~2020-05-09 0:48 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-05-08 7:47 [PATCH] ASoC: rsnd: add interrupt support for SSI BUSIF buffer Yongbo Zhang
2020-05-08 7:47 ` Yongbo Zhang
2020-05-08 23:56 ` kbuild test robot [this message]
2020-05-08 23:56 ` kbuild test robot
2020-05-08 23:56 ` kbuild test robot
2020-05-09 11:07 ` kbuild test robot
2020-05-09 11:07 ` kbuild test robot
2020-05-09 11:07 ` kbuild test robot
2020-05-11 1:30 ` Kuninori Morimoto
2020-05-11 1:30 ` Kuninori Morimoto
2020-05-12 6:39 ` kbuild test robot
2020-05-12 6:39 ` kbuild test robot
2020-05-12 6:39 ` kbuild test robot
2020-05-09 2:23 kbuild test robot
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=202005090732.6ezYxpsf%lkp@intel.com \
--to=lkp@intel.com \
--cc=alsa-devel@alsa-project.org \
--cc=broonie@kernel.org \
--cc=clang-built-linux@googlegroups.com \
--cc=giraffesnn123@gmail.com \
--cc=kbuild-all@lists.01.org \
--cc=kuninori.morimoto.gx@renesas.com \
--cc=lgirdwood@gmail.com \
--cc=licheng0822@thundersoft.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-renesas-soc@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.