diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2024-11-21 14:39:31 -0800 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2024-11-21 14:39:31 -0800 |
commit | 071b34dcf71523a559b6c39f5d21a268a9531b50 (patch) | |
tree | 2996f2e2fd60052b087e6280945c011ae44444ea /sound/soc/renesas/sh7760-ac97.c | |
parent | 55ae3eef10ae813616bd8a421e318d4b0e2f4a0b (diff) | |
parent | e3f8064d8b29036f037fd1ff6000e5d959d84843 (diff) |
Merge tag 'sound-6.13-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound
Pull sound updates from Takashi Iwai:
"This is a relatively calm cycle, and majority of changes are about
ASoC. There are little changes in the core side but we received lots
of new drivers for new vendors.
ALSA Core:
- The new accel operation mode for compress-offload API; only the
core part, the actual user will follow later
ASoC:
- Continued API simplification works
- Renaming of the sh directory to Renesas
- Factoring out of some of the common code for Realtek devices
- Ussal ASoC Intel SOF, AMD and SoundWire updates
- Support for Allwinner H616, AMD ACP 6.3 systems, AWInic AW88081,
Cirrus Logic CS32L84, Everest ES8328, Iron Devices SMA1307,
Longsoon I2S, NeoFidelity NTP8918 and NTP8835, Philips UDA1342,
Qualcomm SM8750, RealTek RT721, and ST Microelectronics STM32MP25
HD- and USB-audio:
- Clean up of IRQ handling in legacy HD-audio driver
- Fix soft lockup at disconnection of non-standard USB drivers
- Scarlett2 mixer improvements
- New quirks and cleanups in HD- and USB-audio"
* tag 'sound-6.13-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound: (278 commits)
ALSA: hda: Poll jack events for LS7A HD-Audio
ASoC: hdmi-codec: reorder channel allocation list
ALSA: ump: Fix the wrong format specifier
ASoC: Intel: soc-acpi-intel-lnl-match: add rt712_vb + rt1320 support
ASoC: stm32: dfsdm: change rate upper limits
ASoC: sma1307: fix uninitialized variable refence
ASoC: dt-bindings: simple-mux: add idle-state property
ASoc: simple-mux: add idle-state support
ASoC: sdca: test adev before calling acpi_dev_for_each_child
ASoC: SOF: ipc4-topology: remove redundant assignment to variable ret
ASoC: amd: ps: fix the pcm device numbering for acp 6.3 platform
ASoC: amd: acp: add soundwire machine driver for legacy stack
ASoC: amd: acp: move get_acp63_cpu_pin_id() to common file
ASoC: amd: ps: add soundwire machines for acp6.3 platform
ASoC: amd: acp: add RT711, RT714 & RT1316 support for acp 6.3 platform
ASoC: amd: acp: add rt722 based soundwire machines
ALSA: compress_offload: Add missing descriptions in structs
ALSA: 6fire: Release resources at card release
ALSA: caiaq: Use snd_card_free_when_closed() at disconnection
ALSA: us122l: Drop mmap_count field
...
Diffstat (limited to 'sound/soc/renesas/sh7760-ac97.c')
-rw-r--r-- | sound/soc/renesas/sh7760-ac97.c | 72 |
1 files changed, 72 insertions, 0 deletions
diff --git a/sound/soc/renesas/sh7760-ac97.c b/sound/soc/renesas/sh7760-ac97.c new file mode 100644 index 000000000000..d267243a159b --- /dev/null +++ b/sound/soc/renesas/sh7760-ac97.c @@ -0,0 +1,72 @@ +// SPDX-License-Identifier: GPL-2.0 +// +// Generic AC97 sound support for SH7760 +// +// (c) 2007 Manuel Lauss + +#include <linux/module.h> +#include <linux/moduleparam.h> +#include <linux/platform_device.h> +#include <sound/core.h> +#include <sound/pcm.h> +#include <sound/soc.h> +#include <asm/io.h> + +#define IPSEL 0xFE400034 + +SND_SOC_DAILINK_DEFS(ac97, + DAILINK_COMP_ARRAY(COMP_CPU("hac-dai.0")), /* HAC0 */ + DAILINK_COMP_ARRAY(COMP_CODEC("ac97-codec", "ac97-hifi")), + DAILINK_COMP_ARRAY(COMP_PLATFORM("sh7760-pcm-audio"))); + +static struct snd_soc_dai_link sh7760_ac97_dai = { + .name = "AC97", + .stream_name = "AC97 HiFi", + SND_SOC_DAILINK_REG(ac97), +}; + +static struct snd_soc_card sh7760_ac97_soc_machine = { + .name = "SH7760 AC97", + .owner = THIS_MODULE, + .dai_link = &sh7760_ac97_dai, + .num_links = 1, +}; + +static struct platform_device *sh7760_ac97_snd_device; + +static int __init sh7760_ac97_init(void) +{ + int ret; + unsigned short ipsel; + + /* enable both AC97 controllers in pinmux reg */ + ipsel = __raw_readw(IPSEL); + __raw_writew(ipsel | (3 << 10), IPSEL); + + ret = -ENOMEM; + sh7760_ac97_snd_device = platform_device_alloc("soc-audio", -1); + if (!sh7760_ac97_snd_device) + goto out; + + platform_set_drvdata(sh7760_ac97_snd_device, + &sh7760_ac97_soc_machine); + ret = platform_device_add(sh7760_ac97_snd_device); + + if (ret) + platform_device_put(sh7760_ac97_snd_device); + +out: + return ret; +} + +static void __exit sh7760_ac97_exit(void) +{ + platform_device_unregister(sh7760_ac97_snd_device); +} + +module_init(sh7760_ac97_init); +module_exit(sh7760_ac97_exit); + +MODULE_LICENSE("GPL v2"); +MODULE_DESCRIPTION("Generic SH7760 AC97 sound machine"); +MODULE_AUTHOR("Manuel Lauss <mano@roarinelk.homelinux.net>"); |