summaryrefslogtreecommitdiffstats
path: root/sound/hda/hdac_stream.c
Commit message (Collapse)AuthorAgeFilesLines
* ALSA: hda - Avoid tricky macrosTakashi Iwai2017-04-031-2/+2
| | | | | | | | | | | | | The macros _snd_hdac_chip_read() and *_write() expand to different types (b,w,l) per their argument. They were thought to be used only internally for other snd_hdac_chip_*() macros, but in some situations we need to call these directly, and they are way too ugly. Instead of saving a few lines, we just write these macros explicitly with the types, so that they can be used in a saner way. Acked-by: Vinod Koul <vinod.koul@intel.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
* clocksource: Use a plain u64 instead of cycle_tThomas Gleixner2016-12-251-3/+3
| | | | | | | | | | | | | | | | | | | | | There is no point in having an extra type for extra confusion. u64 is unambiguous. Conversion was done with the following coccinelle script: @rem@ @@ -typedef u64 cycle_t; @fix@ typedef cycle_t; @@ -cycle_t +u64 Signed-off-by: Thomas Gleixner <tglx@linutronix.de> Cc: Peter Zijlstra <peterz@infradead.org> Cc: John Stultz <john.stultz@linaro.org>
* ALSA: hda - Add / fix kernel doc commentsTakashi Iwai2015-10-281-1/+2
| | | | | | | | Give some readable comment in kernel doc style for each exported function, as I promised in the previous meetings. While we're at it, fix the wrong comments, too. Signed-off-by: Takashi Iwai <tiwai@suse.de>
* ALSA: hdac: Add snd_hdac_get_hdac_stream()Jeeja KP2015-08-231-0/+22
| | | | | | | | | | | Add a helper to find the stream using stream tag and direction. This is useful for drivers to query stream based on stream tag and direction, fox example while downloading FW thru DSP loader code Signed-off-by: Jeeja KP <jeeja.kp@intel.com> Signed-off-by: Vinod Koul <vinod.koul@intel.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
* ALSA: hda - Fix NULL dereference from CA0132 DSP loaderTakashi Iwai2015-05-191-3/+9
| | | | | | | | | | | | | The CA0132 DSP loader leads to NULL deference since the recent transition to HDA core code, as it unconditionally accesses hdac_stream->substream->runtime. For DSP loading, the substream shouldn't be assigned. This patch addresses the NULL dereference above in addition to assure the substream is cleared while DSP loading. Bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id=98151 Signed-off-by: Takashi Iwai <tiwai@suse.de>
* ALSA: hda - add hdac stream traceLibin Yang2015-05-181-0/+5
| | | | | | | Add the trace of snd_hdac_stream_start and snd_hdac_stream_stop. Signed-off-by: Libin Yang <libin.yang@intel.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
* ALSA: hda - add generic functions to set hdac stream paramsJeeja KP2015-04-171-0/+38
| | | | | | | | | | | This will be used by hda controller driver to setup stream params in prepare. This function will setup the bdl and periods. Signed-off-by: Jeeja KP <jeeja.kp@intel.com> Signed-off-by: Subhransu S. Prusty <subhransu.s.prusty@intel.com> Signed-off-by: Vinod Koul <vinod.koul@intel.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
* ALSA: hda - Add missing inclusion of <linux/clocksource.h>Takashi Iwai2015-04-161-0/+1
| | | | | | | | | | For fixing randconfig build errors like: sound/hda/hdac_stream.c: In function 'azx_timecounter_init': sound/hda/hdac_stream.c:365:2: error: implicit declaration of function 'CLOCKSOURCE_MASK' [-Werror=implicit-function-declaration] Reported-by: kbuild test robot <fengguang.wu@intel.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
* ALSA: hda - moved alloc/free stream pages function to controller libraryJeeja KP2015-04-161-2/+0
| | | | | | | | | | Moved azx_alloc_stream_pages and azx_free_stream_pages to controller library. Signed-off-by: Jeeja KP <jeeja.kp@intel.com> Signed-off-by: Subhransu S. Prusty <subhransu.s.prusty@intel.com> Signed-off-by: Vinod Koul <vinod.koul@intel.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
* ALSA: hda - Add DSP loader to core library codeTakashi Iwai2015-04-161-0/+113
| | | | | | Copied from the legacy driver code, no transition done yet. Signed-off-by: Takashi Iwai <tiwai@suse.de>
* ALSA: hda - Add the controller helper codes to hda-core moduleTakashi Iwai2015-04-161-0/+536
This patch adds the controller helper codes to hda-core library. The I/O access ops are added to the bus ops. The CORB/RIRB, the basic attributes like irq# and iomap address, some locks and the list of streams are added to the bus object, together with the stream object and its helpers. Currently the codes are just copied from the legacy driver, so you can find duplicated codes in both directories. Only constants are removed from the original hda_controller.h. More integration work will follow in the later patches. Signed-off-by: Takashi Iwai <tiwai@suse.de>