summaryrefslogtreecommitdiffstats
path: root/sound/soc/atmel/mchp-spdiftx.c
Commit message (Collapse)AuthorAgeFilesLines
* ASoC: mchp-spdiftx: Fix clang -Wbitfield-constant-conversionNathan Chancellor2022-08-151-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | A recent change in clang strengthened its -Wbitfield-constant-conversion to warn when 1 is assigned to a 1-bit signed integer bitfield, as it can only be 0 or -1, not 1: sound/soc/atmel/mchp-spdiftx.c:505:20: error: implicit truncation from 'int' to bit-field changes value from 1 to -1 [-Werror,-Wbitfield-constant-conversion] dev->gclk_enabled = 1; ^ ~ 1 error generated. The actual value of the field is never checked, just that it is not zero, so there is not a real bug here. However, it is simple enough to silence the warning by making the bitfield unsigned, which matches the mchp-spdifrx driver. Fixes: 06ca24e98e6b ("ASoC: mchp-spdiftx: add driver for S/PDIF TX Controller") Link: https://github.com/ClangBuiltLinux/linux/issues/1686 Link: https://github.com/llvm/llvm-project/commit/82afc9b169a67e8b8a1862fb9c41a2cd974d6691 Signed-off-by: Nathan Chancellor <nathan@kernel.org> Reviewed-by: Nick Desaulniers <ndesaulniers@google.com> Link: https://lore.kernel.org/r/20220810010809.2024482-1-nathan@kernel.org Signed-off-by: Mark Brown <broonie@kernel.org>
* ASoC: atmel: one fix and one cleanupMark Brown2022-07-281-8/+0
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Merge series from Claudiu Beznea <claudiu.beznea@microchip.com>: Hi, The series adds one fix for mchp-spdifrx and one cleanups for mchp-spdifrx and mchp-spdifrx drivers. Thank you, Claudiu Beznea Changes in v3: - changed cover letter title s/few/one, s/cleanups/cleanup - fix compilation error and warnings - keep only patch 1/5 and patch 3/5 from previous version as the rest of them were integrated Changes in v2: - s/tag/tab in the title of patch 2/5 Claudiu Beznea (2): ASoC: mchp-spdifrx: disable end of block interrupt on failures ASoC: mchp-spdiftx: remove references to mchp_i2s_caps sound/soc/atmel/mchp-spdifrx.c | 9 ++++++--- sound/soc/atmel/mchp-spdiftx.c | 8 -------- 2 files changed, 6 insertions(+), 11 deletions(-) -- 2.34.1
| * ASoC: mchp-spdiftx: remove references to mchp_i2s_capsClaudiu Beznea2022-07-271-8/+0
| | | | | | | | | | | | | | | | Remove references to struct mchp_i2s_caps as they are not used. Signed-off-by: Claudiu Beznea <claudiu.beznea@microchip.com> Link: https://lore.kernel.org/r/20220727090814.2446111-3-claudiu.beznea@microchip.com Signed-off-by: Mark Brown <broonie@kernel.org>
* | ASoC: atmel: one fix and few cleanupsMark Brown2022-07-261-9/+5
|\ \ | | | | | | | | | | | | | | | | | | Merge series from Claudiu Beznea <claudiu.beznea@microchip.com>: The series adds one fix for mchp-spdifrx and few cleanups for mchp-spdifrx and mchp-spdifrx drivers.
| * | ASoC: mchp-spdiftx: add and remove black line around MODULE_DEVICE_TABLE()Claudiu Beznea2022-07-261-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | Add blank line after MODULE_DEVICE_TABLE() and remove the one before it. Signed-off-by: Claudiu Beznea <claudiu.beznea@microchip.com> Link: https://lore.kernel.org/r/20220725130925.1781791-6-claudiu.beznea@microchip.com Signed-off-by: Mark Brown <broonie@kernel.org>
| * | ASoC: mchp-spdiftx: return directly retClaudiu Beznea2022-07-261-8/+4
| |/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Avoid having patterns like: int ret; // ... ret = 0; // ... ret = call_function(); if (ret) return ret; return 0; and return directly ret for all cases. Signed-off-by: Claudiu Beznea <claudiu.beznea@microchip.com> Link: https://lore.kernel.org/r/20220725130925.1781791-5-claudiu.beznea@microchip.com Signed-off-by: Mark Brown <broonie@kernel.org>
* / ASoC: atmel: Migrate to new style legacy DAI naming flagCharles Keepax2022-06-271-1/+2
|/ | | | | | | | | | | Change the legacy DAI naming flag from opting in to the new scheme (non_legacy_dai_naming), to opting out of it (legacy_dai_naming). These drivers appear to be on the CPU side of the DAI link and currently uses the legacy naming, so add the new flag. Signed-off-by: Charles Keepax <ckeepax@opensource.cirrus.com> Link: https://lore.kernel.org/r/20220623125250.2355471-20-ckeepax@opensource.cirrus.com Signed-off-by: Mark Brown <broonie@kernel.org>
* ASoC: atmel: fix spelling mistakesGu Shengxian2021-07-111-1/+1
| | | | | | | | | | | | Fix some spelling mistakes as follows: regaedles ==> regardless prezent ==> present underrrun ==> underrun controlls ==> controls Signed-off-by: Gu Shengxian <gushengxian@yulong.com> Link: https://lore.kernel.org/r/20210706100230.32633-1-gushengxian507419@gmail.com Signed-off-by: Mark Brown <broonie@kernel.org>
* ASoC: mchp-spdiftx: Do not set Validity bit(s)Codrin Ciubotariu2020-11-041-1/+0
| | | | | | | | | | | The Validity bits (bit 28) must not be set in order to have the samples valid. Some controllers look for this bit and ignore the samples if it is set. Fixes: 06ca24e98e6b ("ASoC: mchp-spdiftx: add driver for S/PDIF TX Controller") Signed-off-by: Codrin Ciubotariu <codrin.ciubotariu@microchip.com> Link: https://lore.kernel.org/r/20201104155738.68403-1-codrin.ciubotariu@microchip.com Signed-off-by: Mark Brown <broonie@kernel.org>
* ASoC: mchp-spdiftx: remove 'TX' from playback stream nameCodrin Ciubotariu2020-10-091-1/+1
| | | | | | | | | Do not include the 'TX' in the stream name since it's obvious for playback. Signed-off-by: Codrin Ciubotariu <codrin.ciubotariu@microchip.com> Link: https://lore.kernel.org/r/20201009123527.2770629-1-codrin.ciubotariu@microchip.com Signed-off-by: Mark Brown <broonie@kernel.org>
* ASoC: mchp-spdiftx: add driver for S/PDIF TX ControllerCodrin Ciubotariu2020-09-091-0/+871
The new SPDIF TX controller is a serial port compliant with the IEC- 60958 standard. It also supports programmable User Data and Channel Status fields. This IP is embedded in Microchip's sama7g5 SoC. Signed-off-by: Codrin Ciubotariu <codrin.ciubotariu@microchip.com> Link: https://lore.kernel.org/r/20200909145348.367033-2-codrin.ciubotariu@microchip.com Signed-off-by: Mark Brown <broonie@kernel.org>