Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

ALSA: HDA: hdac_ext_stream: use consistent prefixes for variables

The existing code maximizes confusion by using 'stream' and 'hstream'
variables of different types. Examples:

struct hdac_stream *stream;
struct hdac_ext_stream *stream;
struct hdac_stream *hstream;
struct hdac_ext_stream *hstream;

with some additional copy/paste remains:
struct hdac_ext_stream *azx_dev;

This patch suggests a consistent naming across all 'hdac_ext_stream'
functions. The convention is:

struct hdac_stream *hstream;
struct hdac_ext_stream *hext_stream;

No functionality change - just renaming of variables and more
consistent indentation.

Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Reviewed-by: Kai Vehmanen <kai.vehmanen@linux.intel.com>
Reviewed-by: Rander Wang <rander.wang@intel.com>
Link: https://lore.kernel.org/r/20211216231128.344321-3-pierre-louis.bossart@linux.intel.com
Signed-off-by: Takashi Iwai <tiwai@suse.de>

authored by

Pierre-Louis Bossart and committed by
Takashi Iwai
0f7e5ee6 12054f0c

+113 -112
+13 -13
include/sound/hdaudio_ext.h
··· 78 78 container_of(s, struct hdac_ext_stream, hstream) 79 79 80 80 void snd_hdac_ext_stream_init(struct hdac_bus *bus, 81 - struct hdac_ext_stream *stream, int idx, 82 - int direction, int tag); 81 + struct hdac_ext_stream *hext_stream, int idx, 82 + int direction, int tag); 83 83 int snd_hdac_ext_stream_init_all(struct hdac_bus *bus, int start_idx, 84 - int num_stream, int dir); 84 + int num_stream, int dir); 85 85 void snd_hdac_stream_free_all(struct hdac_bus *bus); 86 86 void snd_hdac_link_free_all(struct hdac_bus *bus); 87 87 struct hdac_ext_stream *snd_hdac_ext_stream_assign(struct hdac_bus *bus, 88 88 struct snd_pcm_substream *substream, 89 89 int type); 90 - void snd_hdac_ext_stream_release(struct hdac_ext_stream *azx_dev, int type); 90 + void snd_hdac_ext_stream_release(struct hdac_ext_stream *hext_stream, int type); 91 91 void snd_hdac_ext_stream_decouple_locked(struct hdac_bus *bus, 92 - struct hdac_ext_stream *azx_dev, bool decouple); 92 + struct hdac_ext_stream *hext_stream, bool decouple); 93 93 void snd_hdac_ext_stream_decouple(struct hdac_bus *bus, 94 94 struct hdac_ext_stream *azx_dev, bool decouple); 95 95 96 96 int snd_hdac_ext_stream_set_spib(struct hdac_bus *bus, 97 - struct hdac_ext_stream *stream, u32 value); 97 + struct hdac_ext_stream *hext_stream, u32 value); 98 98 int snd_hdac_ext_stream_get_spbmaxfifo(struct hdac_bus *bus, 99 - struct hdac_ext_stream *stream); 99 + struct hdac_ext_stream *hext_stream); 100 100 void snd_hdac_ext_stream_drsm_enable(struct hdac_bus *bus, 101 101 bool enable, int index); 102 102 int snd_hdac_ext_stream_set_dpibr(struct hdac_bus *bus, 103 - struct hdac_ext_stream *stream, u32 value); 104 - int snd_hdac_ext_stream_set_lpib(struct hdac_ext_stream *stream, u32 value); 103 + struct hdac_ext_stream *hext_stream, u32 value); 104 + int snd_hdac_ext_stream_set_lpib(struct hdac_ext_stream *hext_stream, u32 value); 105 105 106 - void snd_hdac_ext_link_stream_start(struct hdac_ext_stream *hstream); 107 - void snd_hdac_ext_link_stream_clear(struct hdac_ext_stream *hstream); 108 - void snd_hdac_ext_link_stream_reset(struct hdac_ext_stream *hstream); 109 - int snd_hdac_ext_link_stream_setup(struct hdac_ext_stream *stream, int fmt); 106 + void snd_hdac_ext_link_stream_start(struct hdac_ext_stream *hext_stream); 107 + void snd_hdac_ext_link_stream_clear(struct hdac_ext_stream *hext_stream); 108 + void snd_hdac_ext_link_stream_reset(struct hdac_ext_stream *hext_stream); 109 + int snd_hdac_ext_link_stream_setup(struct hdac_ext_stream *hext_stream, int fmt); 110 110 111 111 struct hdac_ext_link { 112 112 struct hdac_bus *bus;
+100 -99
sound/hda/ext/hdac_ext_stream.c
··· 18 18 /** 19 19 * snd_hdac_ext_stream_init - initialize each stream (aka device) 20 20 * @bus: HD-audio core bus 21 - * @stream: HD-audio ext core stream object to initialize 21 + * @hext_stream: HD-audio ext core stream object to initialize 22 22 * @idx: stream index number 23 23 * @direction: stream direction (SNDRV_PCM_STREAM_PLAYBACK or SNDRV_PCM_STREAM_CAPTURE) 24 24 * @tag: the tag id to assign ··· 27 27 * invoke hdac stream initialization routine 28 28 */ 29 29 void snd_hdac_ext_stream_init(struct hdac_bus *bus, 30 - struct hdac_ext_stream *stream, 31 - int idx, int direction, int tag) 30 + struct hdac_ext_stream *hext_stream, 31 + int idx, int direction, int tag) 32 32 { 33 33 if (bus->ppcap) { 34 - stream->pphc_addr = bus->ppcap + AZX_PPHC_BASE + 34 + hext_stream->pphc_addr = bus->ppcap + AZX_PPHC_BASE + 35 35 AZX_PPHC_INTERVAL * idx; 36 36 37 - stream->pplc_addr = bus->ppcap + AZX_PPLC_BASE + 37 + hext_stream->pplc_addr = bus->ppcap + AZX_PPLC_BASE + 38 38 AZX_PPLC_MULTI * bus->num_streams + 39 39 AZX_PPLC_INTERVAL * idx; 40 40 } 41 41 42 42 if (bus->spbcap) { 43 - stream->spib_addr = bus->spbcap + AZX_SPB_BASE + 43 + hext_stream->spib_addr = bus->spbcap + AZX_SPB_BASE + 44 44 AZX_SPB_INTERVAL * idx + 45 45 AZX_SPB_SPIB; 46 46 47 - stream->fifo_addr = bus->spbcap + AZX_SPB_BASE + 47 + hext_stream->fifo_addr = bus->spbcap + AZX_SPB_BASE + 48 48 AZX_SPB_INTERVAL * idx + 49 49 AZX_SPB_MAXFIFO; 50 50 } 51 51 52 52 if (bus->drsmcap) 53 - stream->dpibr_addr = bus->drsmcap + AZX_DRSM_BASE + 53 + hext_stream->dpibr_addr = bus->drsmcap + AZX_DRSM_BASE + 54 54 AZX_DRSM_INTERVAL * idx; 55 55 56 - stream->decoupled = false; 57 - snd_hdac_stream_init(bus, &stream->hstream, idx, direction, tag); 56 + hext_stream->decoupled = false; 57 + snd_hdac_stream_init(bus, &hext_stream->hstream, idx, direction, tag); 58 58 } 59 59 EXPORT_SYMBOL_GPL(snd_hdac_ext_stream_init); 60 60 ··· 67 67 * @dir: direction of streams 68 68 */ 69 69 int snd_hdac_ext_stream_init_all(struct hdac_bus *bus, int start_idx, 70 - int num_stream, int dir) 70 + int num_stream, int dir) 71 71 { 72 72 int stream_tag = 0; 73 73 int i, tag, idx = start_idx; 74 74 75 75 for (i = 0; i < num_stream; i++) { 76 - struct hdac_ext_stream *stream = 77 - kzalloc(sizeof(*stream), GFP_KERNEL); 78 - if (!stream) 76 + struct hdac_ext_stream *hext_stream = 77 + kzalloc(sizeof(*hext_stream), GFP_KERNEL); 78 + if (!hext_stream) 79 79 return -ENOMEM; 80 80 tag = ++stream_tag; 81 - snd_hdac_ext_stream_init(bus, stream, idx, dir, tag); 81 + snd_hdac_ext_stream_init(bus, hext_stream, idx, dir, tag); 82 82 idx++; 83 83 } 84 84 ··· 95 95 void snd_hdac_stream_free_all(struct hdac_bus *bus) 96 96 { 97 97 struct hdac_stream *s, *_s; 98 - struct hdac_ext_stream *stream; 98 + struct hdac_ext_stream *hext_stream; 99 99 100 100 list_for_each_entry_safe(s, _s, &bus->stream_list, list) { 101 - stream = stream_to_hdac_ext_stream(s); 102 - snd_hdac_ext_stream_decouple(bus, stream, false); 101 + hext_stream = stream_to_hdac_ext_stream(s); 102 + snd_hdac_ext_stream_decouple(bus, hext_stream, false); 103 103 list_del(&s->list); 104 - kfree(stream); 104 + kfree(hext_stream); 105 105 } 106 106 } 107 107 EXPORT_SYMBOL_GPL(snd_hdac_stream_free_all); 108 108 109 109 void snd_hdac_ext_stream_decouple_locked(struct hdac_bus *bus, 110 - struct hdac_ext_stream *stream, 110 + struct hdac_ext_stream *hext_stream, 111 111 bool decouple) 112 112 { 113 - struct hdac_stream *hstream = &stream->hstream; 113 + struct hdac_stream *hstream = &hext_stream->hstream; 114 114 u32 val; 115 115 int mask = AZX_PPCTL_PROCEN(hstream->index); 116 116 ··· 121 121 else if (!decouple && val) 122 122 snd_hdac_updatel(bus->ppcap, AZX_REG_PP_PPCTL, mask, 0); 123 123 124 - stream->decoupled = decouple; 124 + hext_stream->decoupled = decouple; 125 125 } 126 126 EXPORT_SYMBOL_GPL(snd_hdac_ext_stream_decouple_locked); 127 127 128 128 /** 129 129 * snd_hdac_ext_stream_decouple - decouple the hdac stream 130 130 * @bus: HD-audio core bus 131 - * @stream: HD-audio ext core stream object to initialize 131 + * @hext_stream: HD-audio ext core stream object to initialize 132 132 * @decouple: flag to decouple 133 133 */ 134 134 void snd_hdac_ext_stream_decouple(struct hdac_bus *bus, 135 - struct hdac_ext_stream *stream, bool decouple) 135 + struct hdac_ext_stream *hext_stream, bool decouple) 136 136 { 137 137 spin_lock_irq(&bus->reg_lock); 138 - snd_hdac_ext_stream_decouple_locked(bus, stream, decouple); 138 + snd_hdac_ext_stream_decouple_locked(bus, hext_stream, decouple); 139 139 spin_unlock_irq(&bus->reg_lock); 140 140 } 141 141 EXPORT_SYMBOL_GPL(snd_hdac_ext_stream_decouple); 142 142 143 143 /** 144 144 * snd_hdac_ext_link_stream_start - start a stream 145 - * @stream: HD-audio ext core stream to start 145 + * @hext_stream: HD-audio ext core stream to start 146 146 */ 147 - void snd_hdac_ext_link_stream_start(struct hdac_ext_stream *stream) 147 + void snd_hdac_ext_link_stream_start(struct hdac_ext_stream *hext_stream) 148 148 { 149 - snd_hdac_updatel(stream->pplc_addr, AZX_REG_PPLCCTL, 149 + snd_hdac_updatel(hext_stream->pplc_addr, AZX_REG_PPLCCTL, 150 150 AZX_PPLCCTL_RUN, AZX_PPLCCTL_RUN); 151 151 } 152 152 EXPORT_SYMBOL_GPL(snd_hdac_ext_link_stream_start); 153 153 154 154 /** 155 155 * snd_hdac_ext_link_stream_clear - stop a stream DMA 156 - * @stream: HD-audio ext core stream to stop 156 + * @hext_stream: HD-audio ext core stream to stop 157 157 */ 158 - void snd_hdac_ext_link_stream_clear(struct hdac_ext_stream *stream) 158 + void snd_hdac_ext_link_stream_clear(struct hdac_ext_stream *hext_stream) 159 159 { 160 - snd_hdac_updatel(stream->pplc_addr, AZX_REG_PPLCCTL, AZX_PPLCCTL_RUN, 0); 160 + snd_hdac_updatel(hext_stream->pplc_addr, AZX_REG_PPLCCTL, AZX_PPLCCTL_RUN, 0); 161 161 } 162 162 EXPORT_SYMBOL_GPL(snd_hdac_ext_link_stream_clear); 163 163 164 164 /** 165 165 * snd_hdac_ext_link_stream_reset - reset a stream 166 - * @stream: HD-audio ext core stream to reset 166 + * @hext_stream: HD-audio ext core stream to reset 167 167 */ 168 - void snd_hdac_ext_link_stream_reset(struct hdac_ext_stream *stream) 168 + void snd_hdac_ext_link_stream_reset(struct hdac_ext_stream *hext_stream) 169 169 { 170 170 unsigned char val; 171 171 int timeout; 172 172 173 - snd_hdac_ext_link_stream_clear(stream); 173 + snd_hdac_ext_link_stream_clear(hext_stream); 174 174 175 - snd_hdac_updatel(stream->pplc_addr, AZX_REG_PPLCCTL, 175 + snd_hdac_updatel(hext_stream->pplc_addr, AZX_REG_PPLCCTL, 176 176 AZX_PPLCCTL_STRST, AZX_PPLCCTL_STRST); 177 177 udelay(3); 178 178 timeout = 50; 179 179 do { 180 - val = readl(stream->pplc_addr + AZX_REG_PPLCCTL) & 180 + val = readl(hext_stream->pplc_addr + AZX_REG_PPLCCTL) & 181 181 AZX_PPLCCTL_STRST; 182 182 if (val) 183 183 break; 184 184 udelay(3); 185 185 } while (--timeout); 186 186 val &= ~AZX_PPLCCTL_STRST; 187 - writel(val, stream->pplc_addr + AZX_REG_PPLCCTL); 187 + writel(val, hext_stream->pplc_addr + AZX_REG_PPLCCTL); 188 188 udelay(3); 189 189 190 190 timeout = 50; 191 191 /* waiting for hardware to report that the stream is out of reset */ 192 192 do { 193 - val = readl(stream->pplc_addr + AZX_REG_PPLCCTL) & AZX_PPLCCTL_STRST; 193 + val = readl(hext_stream->pplc_addr + AZX_REG_PPLCCTL) & AZX_PPLCCTL_STRST; 194 194 if (!val) 195 195 break; 196 196 udelay(3); ··· 201 201 202 202 /** 203 203 * snd_hdac_ext_link_stream_setup - set up the SD for streaming 204 - * @stream: HD-audio ext core stream to set up 204 + * @hext_stream: HD-audio ext core stream to set up 205 205 * @fmt: stream format 206 206 */ 207 - int snd_hdac_ext_link_stream_setup(struct hdac_ext_stream *stream, int fmt) 207 + int snd_hdac_ext_link_stream_setup(struct hdac_ext_stream *hext_stream, int fmt) 208 208 { 209 - struct hdac_stream *hstream = &stream->hstream; 209 + struct hdac_stream *hstream = &hext_stream->hstream; 210 210 unsigned int val; 211 211 212 212 /* make sure the run bit is zero for SD */ 213 - snd_hdac_ext_link_stream_clear(stream); 213 + snd_hdac_ext_link_stream_clear(hext_stream); 214 214 /* program the stream_tag */ 215 - val = readl(stream->pplc_addr + AZX_REG_PPLCCTL); 215 + val = readl(hext_stream->pplc_addr + AZX_REG_PPLCCTL); 216 216 val = (val & ~AZX_PPLCCTL_STRM_MASK) | 217 217 (hstream->stream_tag << AZX_PPLCCTL_STRM_SHIFT); 218 - writel(val, stream->pplc_addr + AZX_REG_PPLCCTL); 218 + writel(val, hext_stream->pplc_addr + AZX_REG_PPLCCTL); 219 219 220 220 /* program the stream format */ 221 - writew(fmt, stream->pplc_addr + AZX_REG_PPLCFMT); 221 + writew(fmt, hext_stream->pplc_addr + AZX_REG_PPLCFMT); 222 222 223 223 return 0; 224 224 } ··· 230 230 * @stream: stream id 231 231 */ 232 232 void snd_hdac_ext_link_set_stream_id(struct hdac_ext_link *link, 233 - int stream) 233 + int stream) 234 234 { 235 235 snd_hdac_updatew(link->ml_addr, AZX_REG_ML_LOSIDV, (1 << stream), 1 << stream); 236 236 } ··· 250 250 251 251 static struct hdac_ext_stream * 252 252 hdac_ext_link_stream_assign(struct hdac_bus *bus, 253 - struct snd_pcm_substream *substream) 253 + struct snd_pcm_substream *substream) 254 254 { 255 255 struct hdac_ext_stream *res = NULL; 256 - struct hdac_stream *stream = NULL; 256 + struct hdac_stream *hstream = NULL; 257 257 258 258 if (!bus->ppcap) { 259 259 dev_err(bus->dev, "stream type not supported\n"); ··· 261 261 } 262 262 263 263 spin_lock_irq(&bus->reg_lock); 264 - list_for_each_entry(stream, &bus->stream_list, list) { 265 - struct hdac_ext_stream *hstream = container_of(stream, 266 - struct hdac_ext_stream, 267 - hstream); 268 - if (stream->direction != substream->stream) 264 + list_for_each_entry(hstream, &bus->stream_list, list) { 265 + struct hdac_ext_stream *hext_stream = container_of(hstream, 266 + struct hdac_ext_stream, 267 + hstream); 268 + if (hstream->direction != substream->stream) 269 269 continue; 270 270 271 271 /* check if decoupled stream and not in use is available */ 272 - if (hstream->decoupled && !hstream->link_locked) { 273 - res = hstream; 272 + if (hext_stream->decoupled && !hext_stream->link_locked) { 273 + res = hext_stream; 274 274 break; 275 275 } 276 276 277 - if (!hstream->link_locked) { 278 - snd_hdac_ext_stream_decouple_locked(bus, hstream, true); 279 - res = hstream; 277 + if (!hext_stream->link_locked) { 278 + snd_hdac_ext_stream_decouple_locked(bus, hext_stream, true); 279 + res = hext_stream; 280 280 break; 281 281 } 282 282 } ··· 290 290 291 291 static struct hdac_ext_stream * 292 292 hdac_ext_host_stream_assign(struct hdac_bus *bus, 293 - struct snd_pcm_substream *substream) 293 + struct snd_pcm_substream *substream) 294 294 { 295 295 struct hdac_ext_stream *res = NULL; 296 - struct hdac_stream *stream = NULL; 296 + struct hdac_stream *hstream = NULL; 297 297 298 298 if (!bus->ppcap) { 299 299 dev_err(bus->dev, "stream type not supported\n"); ··· 301 301 } 302 302 303 303 spin_lock_irq(&bus->reg_lock); 304 - list_for_each_entry(stream, &bus->stream_list, list) { 305 - struct hdac_ext_stream *hstream = container_of(stream, 306 - struct hdac_ext_stream, 307 - hstream); 308 - if (stream->direction != substream->stream) 304 + list_for_each_entry(hstream, &bus->stream_list, list) { 305 + struct hdac_ext_stream *hext_stream = container_of(hstream, 306 + struct hdac_ext_stream, 307 + hstream); 308 + if (hstream->direction != substream->stream) 309 309 continue; 310 310 311 - if (!stream->opened) { 312 - if (!hstream->decoupled) 313 - snd_hdac_ext_stream_decouple_locked(bus, hstream, true); 314 - res = hstream; 311 + if (!hstream->opened) { 312 + if (!hext_stream->decoupled) 313 + snd_hdac_ext_stream_decouple_locked(bus, hext_stream, true); 314 + res = hext_stream; 315 315 break; 316 316 } 317 317 } ··· 346 346 struct snd_pcm_substream *substream, 347 347 int type) 348 348 { 349 - struct hdac_ext_stream *hstream = NULL; 350 - struct hdac_stream *stream = NULL; 349 + struct hdac_ext_stream *hext_stream = NULL; 350 + struct hdac_stream *hstream = NULL; 351 351 352 352 switch (type) { 353 353 case HDAC_EXT_STREAM_TYPE_COUPLED: 354 - stream = snd_hdac_stream_assign(bus, substream); 355 - if (stream) 356 - hstream = container_of(stream, 357 - struct hdac_ext_stream, hstream); 358 - return hstream; 354 + hstream = snd_hdac_stream_assign(bus, substream); 355 + if (hstream) 356 + hext_stream = container_of(hstream, 357 + struct hdac_ext_stream, 358 + hstream); 359 + return hext_stream; 359 360 360 361 case HDAC_EXT_STREAM_TYPE_HOST: 361 362 return hdac_ext_host_stream_assign(bus, substream); ··· 372 371 373 372 /** 374 373 * snd_hdac_ext_stream_release - release the assigned stream 375 - * @stream: HD-audio ext core stream to release 374 + * @hext_stream: HD-audio ext core stream to release 376 375 * @type: type of stream (coupled, host or link stream) 377 376 * 378 377 * Release the stream that has been assigned by snd_hdac_ext_stream_assign(). 379 378 */ 380 - void snd_hdac_ext_stream_release(struct hdac_ext_stream *stream, int type) 379 + void snd_hdac_ext_stream_release(struct hdac_ext_stream *hext_stream, int type) 381 380 { 382 - struct hdac_bus *bus = stream->hstream.bus; 381 + struct hdac_bus *bus = hext_stream->hstream.bus; 383 382 384 383 switch (type) { 385 384 case HDAC_EXT_STREAM_TYPE_COUPLED: 386 - snd_hdac_stream_release(&stream->hstream); 385 + snd_hdac_stream_release(&hext_stream->hstream); 387 386 break; 388 387 389 388 case HDAC_EXT_STREAM_TYPE_HOST: 390 389 spin_lock_irq(&bus->reg_lock); 391 - if (stream->decoupled && !stream->link_locked) 392 - snd_hdac_ext_stream_decouple_locked(bus, stream, false); 390 + if (hext_stream->decoupled && !hext_stream->link_locked) 391 + snd_hdac_ext_stream_decouple_locked(bus, hext_stream, false); 393 392 spin_unlock_irq(&bus->reg_lock); 394 - snd_hdac_stream_release(&stream->hstream); 393 + snd_hdac_stream_release(&hext_stream->hstream); 395 394 break; 396 395 397 396 case HDAC_EXT_STREAM_TYPE_LINK: 398 397 spin_lock_irq(&bus->reg_lock); 399 - if (stream->decoupled && !stream->hstream.opened) 400 - snd_hdac_ext_stream_decouple_locked(bus, stream, false); 401 - stream->link_locked = 0; 402 - stream->link_substream = NULL; 398 + if (hext_stream->decoupled && !hext_stream->hstream.opened) 399 + snd_hdac_ext_stream_decouple_locked(bus, hext_stream, false); 400 + hext_stream->link_locked = 0; 401 + hext_stream->link_substream = NULL; 403 402 spin_unlock_irq(&bus->reg_lock); 404 403 break; 405 404 ··· 438 437 /** 439 438 * snd_hdac_ext_stream_set_spib - sets the spib value of a stream 440 439 * @bus: HD-audio core bus 441 - * @stream: hdac_ext_stream 440 + * @hext_stream: hdac_ext_stream 442 441 * @value: spib value to set 443 442 */ 444 443 int snd_hdac_ext_stream_set_spib(struct hdac_bus *bus, 445 - struct hdac_ext_stream *stream, u32 value) 444 + struct hdac_ext_stream *hext_stream, u32 value) 446 445 { 447 446 448 447 if (!bus->spbcap) { ··· 450 449 return -EINVAL; 451 450 } 452 451 453 - writel(value, stream->spib_addr); 452 + writel(value, hext_stream->spib_addr); 454 453 455 454 return 0; 456 455 } ··· 459 458 /** 460 459 * snd_hdac_ext_stream_get_spbmaxfifo - gets the spib value of a stream 461 460 * @bus: HD-audio core bus 462 - * @stream: hdac_ext_stream 461 + * @hext_stream: hdac_ext_stream 463 462 * 464 463 * Return maxfifo for the stream 465 464 */ 466 465 int snd_hdac_ext_stream_get_spbmaxfifo(struct hdac_bus *bus, 467 - struct hdac_ext_stream *stream) 466 + struct hdac_ext_stream *hext_stream) 468 467 { 469 468 470 469 if (!bus->spbcap) { ··· 472 471 return -EINVAL; 473 472 } 474 473 475 - return readl(stream->fifo_addr); 474 + return readl(hext_stream->fifo_addr); 476 475 } 477 476 EXPORT_SYMBOL_GPL(snd_hdac_ext_stream_get_spbmaxfifo); 478 477 ··· 504 503 /** 505 504 * snd_hdac_ext_stream_set_dpibr - sets the dpibr value of a stream 506 505 * @bus: HD-audio core bus 507 - * @stream: hdac_ext_stream 506 + * @hext_stream: hdac_ext_stream 508 507 * @value: dpib value to set 509 508 */ 510 509 int snd_hdac_ext_stream_set_dpibr(struct hdac_bus *bus, 511 - struct hdac_ext_stream *stream, u32 value) 510 + struct hdac_ext_stream *hext_stream, u32 value) 512 511 { 513 512 514 513 if (!bus->drsmcap) { ··· 516 515 return -EINVAL; 517 516 } 518 517 519 - writel(value, stream->dpibr_addr); 518 + writel(value, hext_stream->dpibr_addr); 520 519 521 520 return 0; 522 521 } ··· 524 523 525 524 /** 526 525 * snd_hdac_ext_stream_set_lpib - sets the lpib value of a stream 527 - * @stream: hdac_ext_stream 526 + * @hext_stream: hdac_ext_stream 528 527 * @value: lpib value to set 529 528 */ 530 - int snd_hdac_ext_stream_set_lpib(struct hdac_ext_stream *stream, u32 value) 529 + int snd_hdac_ext_stream_set_lpib(struct hdac_ext_stream *hext_stream, u32 value) 531 530 { 532 - snd_hdac_stream_writel(&stream->hstream, SD_LPIB, value); 531 + snd_hdac_stream_writel(&hext_stream->hstream, SD_LPIB, value); 533 532 534 533 return 0; 535 534 }