sound/soc/uniphier/aio-pxs2.c

Source file repositories/reference/linux-study-clean/sound/soc/uniphier/aio-pxs2.c

File Facts

System
Linux kernel
Corpus path
sound/soc/uniphier/aio-pxs2.c
Extension
.c
Size
6059 bytes
Lines
266
Domain
Driver Families
Bucket
sound/soc
Inferred role
Driver Families: implementation source
Status
source implementation candidate

Why This File Exists

Repeatable hardware-adapter layer. Deep compatibility for every driver is out of scope; this atlas records patterns, probe lifecycles, bus glue, IRQ/DMA usage, and links back to core abstractions.

Dependency Surface

Detected Declarations

Annotated Snippet

// SPDX-License-Identifier: GPL-2.0
//
// Socionext UniPhier AIO ALSA driver for PXs2.
//
// Copyright (c) 2018 Socionext Inc.

#include <linux/module.h>

#include "aio.h"

static const struct uniphier_aio_spec uniphier_aio_pxs2[] = {
	/* for Line PCM In, Pin:AI1Dx */
	{
		.name = AUD_NAME_PCMIN1,
		.gname = AUD_GNAME_LINE,
		.swm = {
			.type  = PORT_TYPE_I2S,
			.dir   = PORT_DIR_INPUT,
			.rb    = { 16, 11, },
			.ch    = { 16, 11, },
			.iif   = { 0, 0, },
			.iport = { 0, AUD_HW_PCMIN1, },
		},
	},

	/* for Speaker/Headphone/Mic PCM In, Pin:AI2Dx */
	{
		.name = AUD_NAME_PCMIN2,
		.gname = AUD_GNAME_AUX,
		.swm = {
			.type  = PORT_TYPE_I2S,
			.dir   = PORT_DIR_INPUT,
			.rb    = { 17, 12, },
			.ch    = { 17, 12, },
			.iif   = { 1, 1, },
			.iport = { 1, AUD_HW_PCMIN2, },
		},
	},

	/* for HDMI PCM Out, Pin:AO1Dx (inner) */
	{
		.name = AUD_NAME_HPCMOUT1,
		.gname = AUD_GNAME_HDMI,
		.swm = {
			.type  = PORT_TYPE_I2S,
			.dir   = PORT_DIR_OUTPUT,
			.rb    = { 0, 0, },
			.ch    = { 0, 0, },
			.oif   = { 0, 0, },
			.oport = { 3, AUD_HW_HPCMOUT1, },
		},
	},

	/* for Line PCM Out, Pin:AO2Dx */
	{
		.name = AUD_NAME_PCMOUT1,
		.gname = AUD_GNAME_LINE,
		.swm = {
			.type  = PORT_TYPE_I2S,
			.dir   = PORT_DIR_OUTPUT,
			.rb    = { 1, 1, },
			.ch    = { 1, 1, },
			.oif   = { 1, 1, },
			.oport = { 0, AUD_HW_PCMOUT1, },
		},
	},

	/* for Speaker/Headphone/Mic PCM Out, Pin:AO3Dx */
	{
		.name = AUD_NAME_PCMOUT2,
		.gname = AUD_GNAME_AUX,
		.swm = {
			.type  = PORT_TYPE_I2S,
			.dir   = PORT_DIR_OUTPUT,
			.rb    = { 2, 2, },
			.ch    = { 2, 2, },
			.oif   = { 2, 2, },
			.oport = { 1, AUD_HW_PCMOUT2, },
		},
	},

	/* for HDMI Out, Pin:AO1IEC */
	{
		.name = AUD_NAME_HIECOUT1,
		.swm = {
			.type  = PORT_TYPE_SPDIF,
			.dir   = PORT_DIR_OUTPUT,
			.rb    = { 6, 4, },
			.ch    = { 6, 4, },
			.oif   = { 6, 4, },

Annotation

Implementation Notes