Skip to content

Commit 404735c

Browse files
Vinod Koultiwai
authored andcommitted
ALSA - Ext hda: remove bus_parse_capabilities
Remove the unused one as we have moved it up to hdac core. Signed-off-by: Vinod Koul <[email protected]> Signed-off-by: Takashi Iwai <[email protected]>
1 parent ec8ae57 commit 404735c

File tree

2 files changed

+0
-87
lines changed

2 files changed

+0
-87
lines changed

include/sound/hdaudio_ext.h

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -8,11 +8,6 @@
88
*
99
* @bus: hdac bus
1010
* @num_streams: streams supported
11-
* @ppcap: pp capabilities pointer
12-
* @spbcap: SPIB capabilities pointer
13-
* @mlcap: MultiLink capabilities pointer
14-
* @gtscap: gts capabilities pointer
15-
* @drsmcap: dma resume capabilities pointer
1611
* @hlink_list: link list of HDA links
1712
* @lock: lock for link mgmt
1813
* @cmd_dma_state: state of cmd DMAs: CORB and RIRB
@@ -22,12 +17,6 @@ struct hdac_ext_bus {
2217
int num_streams;
2318
int idx;
2419

25-
void __iomem *ppcap;
26-
void __iomem *spbcap;
27-
void __iomem *mlcap;
28-
void __iomem *gtscap;
29-
void __iomem *drsmcap;
30-
3120
struct list_head hlink_list;
3221

3322
struct mutex lock;
@@ -54,7 +43,6 @@ void snd_hdac_ext_bus_device_remove(struct hdac_ext_bus *ebus);
5443
#define HDA_CODEC_EXT_ENTRY(_vid, _revid, _name, _drv_data) \
5544
HDA_CODEC_REV_EXT_ENTRY(_vid, _revid, _name, _drv_data)
5645

57-
int snd_hdac_ext_bus_parse_capabilities(struct hdac_ext_bus *sbus);
5846
void snd_hdac_ext_bus_ppcap_enable(struct hdac_ext_bus *chip, bool enable);
5947
void snd_hdac_ext_bus_ppcap_int_enable(struct hdac_ext_bus *chip, bool enable);
6048

sound/hda/ext/hdac_ext_controller.c

Lines changed: 0 additions & 75 deletions
Original file line numberDiff line numberDiff line change
@@ -29,81 +29,6 @@
2929
*/
3030
#define HDAC_MAX_CAPS 10
3131

32-
/**
33-
* snd_hdac_ext_bus_parse_capabilities - parse capablity structure
34-
* @ebus: the pointer to extended bus object
35-
*
36-
* Returns 0 if successful, or a negative error code.
37-
*/
38-
int snd_hdac_ext_bus_parse_capabilities(struct hdac_ext_bus *ebus)
39-
{
40-
unsigned int cur_cap;
41-
unsigned int offset;
42-
struct hdac_bus *bus = &ebus->bus;
43-
unsigned int counter = 0;
44-
45-
offset = snd_hdac_chip_readl(bus, LLCH);
46-
47-
/* Lets walk the linked capabilities list */
48-
do {
49-
cur_cap = _snd_hdac_chip_read(l, bus, offset);
50-
51-
dev_dbg(bus->dev, "Capability version: 0x%x\n",
52-
((cur_cap & AZX_CAP_HDR_VER_MASK) >> AZX_CAP_HDR_VER_OFF));
53-
54-
dev_dbg(bus->dev, "HDA capability ID: 0x%x\n",
55-
(cur_cap & AZX_CAP_HDR_ID_MASK) >> AZX_CAP_HDR_ID_OFF);
56-
57-
switch ((cur_cap & AZX_CAP_HDR_ID_MASK) >> AZX_CAP_HDR_ID_OFF) {
58-
case AZX_ML_CAP_ID:
59-
dev_dbg(bus->dev, "Found ML capability\n");
60-
ebus->mlcap = bus->remap_addr + offset;
61-
break;
62-
63-
case AZX_GTS_CAP_ID:
64-
dev_dbg(bus->dev, "Found GTS capability offset=%x\n", offset);
65-
ebus->gtscap = bus->remap_addr + offset;
66-
break;
67-
68-
case AZX_PP_CAP_ID:
69-
/* PP capability found, the Audio DSP is present */
70-
dev_dbg(bus->dev, "Found PP capability offset=%x\n", offset);
71-
ebus->ppcap = bus->remap_addr + offset;
72-
break;
73-
74-
case AZX_SPB_CAP_ID:
75-
/* SPIB capability found, handler function */
76-
dev_dbg(bus->dev, "Found SPB capability\n");
77-
ebus->spbcap = bus->remap_addr + offset;
78-
break;
79-
80-
case AZX_DRSM_CAP_ID:
81-
/* DMA resume capability found, handler function */
82-
dev_dbg(bus->dev, "Found DRSM capability\n");
83-
ebus->drsmcap = bus->remap_addr + offset;
84-
break;
85-
86-
default:
87-
dev_dbg(bus->dev, "Unknown capability %d\n", cur_cap);
88-
break;
89-
}
90-
91-
counter++;
92-
93-
if (counter > HDAC_MAX_CAPS) {
94-
dev_err(bus->dev, "We exceeded HDAC Ext capablities!!!\n");
95-
break;
96-
}
97-
98-
/* read the offset of next capabiity */
99-
offset = cur_cap & AZX_CAP_HDR_NXT_PTR_MASK;
100-
101-
} while (offset);
102-
103-
return 0;
104-
}
105-
EXPORT_SYMBOL_GPL(snd_hdac_ext_bus_parse_capabilities);
106-
10732
/*
10833
* processing pipe helpers - these helpers are useful for dealing with HDA
10934
* new capability of processing pipelines

0 commit comments

Comments
 (0)