aboutsummaryrefslogtreecommitdiffstats
path: root/sound/hda/hdac_stream.c (follow)
AgeCommit message (Collapse)AuthorFilesLines
2019-05-21treewide: Add SPDX license identifier for missed filesThomas Gleixner1-0/+1
Add SPDX license identifiers to all files which: - Have no license information of any form - Have EXPORT_.*_SYMBOL_GPL inside which was used in the initial scan/conversion to ignore the file These files fall under the project license, GPL v2 only. The resulting SPDX license identifier is: GPL-2.0-only Signed-off-by: Thomas Gleixner <tglx@linutronix.de> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2019-03-13ALSA: hda: Avoid NULL pointer dereference at snd_hdac_stream_start()Mariusz Ceier1-1/+4
For ca0132 codec, azx_dev->stream is NULL during firmware loading. Calling snd_hdac_get_stream_stripe_ctl unconditionally causes NULL pointer dereference in that function. Fixes: 9b6f7e7a296e ("ALSA: hda: program stripe bits for controller") Signed-off-by: Mariusz Ceier <mceier+kernel@gmail.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2019-01-14ALSA: hda: program stripe bits for controllerSameer Pujar1-0/+6
Platforms having multiple SORs and hdmi/dp sinks require higher bandwidth to support simultaneous playbacks of higher resolution. If hda controller supports multiple SDO lines, STRIPE can be used to indicate how many of the SDO lines the stream should be striped across. During stream start stripe control bits are programmed to use given number of sdo lines and the same is cleared during stream stop. Signed-off-by: Sameer Pujar <spujar@nvidia.com> Reviewed-by: Mohan Kumar D <mkumard@nvidia.com> Reviewed-by: Ravindra Lokhande <rlokhande@nvidia.com> Reviewed-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2019-01-14ALSA: hda: Add api to program stripe control bitsSameer Pujar1-0/+34
Controllers and codecs can support striping of audio out across multiple SDO lines. The number of supported SDO lines can be specific to chip. GCAP register can be read to know the maximum supported SDO lines. snd_hdac_get_stream_stripe_ctl() is exposed to program stripe bits on controller and codec side. stripe value: 0 for 1SDO, 1 for 2SDO, 2 for 4SDO lines, etc., Signed-off-by: Sameer Pujar <spujar@nvidia.com> Reviewed-by: Mohan Kumar D <mkumard@nvidia.com> Reviewed-by: Ravindra Lokhande <rlokhande@nvidia.com> Reviewed-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2019-01-09ALSA: hda: Fix a mask wrong issue in snd_hdac_stream_start()Keyon Jie1-1/+3
To enable SIE(Stream Interrupt Enable) in snd_hdac_stream_start(), we should set both mask and value to be "1 << azx_dev->index" for register update, the mask was 0, here fix it. Signed-off-by: Keyon Jie <yang.jie@linux.intel.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2018-07-27ALSA: hda: Proper endian notations for BDL pointersTakashi Iwai1-2/+2
The BDL pointer used in snd_hdac_dsp_prepare() should be declared as __le32, as warned by sparse: sound/hda/hdac_stream.c:655:47: warning: incorrect type in argument 4 (different base types) sound/hda/hdac_stream.c:655:47: expected restricted __le32 [usertype] **bdlp sound/hda/hdac_stream.c:655:47: got unsigned int [usertype] **<noident> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2017-04-03ALSA: hda - Avoid tricky macrosTakashi Iwai1-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>
2016-12-25clocksource: Use a plain u64 instead of cycle_tThomas Gleixner1-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>
2015-10-28ALSA: hda - Add / fix kernel doc commentsTakashi Iwai1-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>
2015-08-23ALSA: hdac: Add snd_hdac_get_hdac_stream()Jeeja KP1-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>
2015-05-19ALSA: hda - Fix NULL dereference from CA0132 DSP loaderTakashi Iwai1-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>
2015-05-18ALSA: hda - add hdac stream traceLibin Yang1-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>
2015-04-17ALSA: hda - add generic functions to set hdac stream paramsJeeja KP1-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>
2015-04-16ALSA: hda - Add missing inclusion of <linux/clocksource.h>Takashi Iwai1-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>
2015-04-16ALSA: hda - moved alloc/free stream pages function to controller libraryJeeja KP1-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>
2015-04-16ALSA: hda - Add DSP loader to core library codeTakashi Iwai1-0/+113
Copied from the legacy driver code, no transition done yet. Signed-off-by: Takashi Iwai <tiwai@suse.de>
2015-04-16ALSA: hda - Add the controller helper codes to hda-core moduleTakashi Iwai1-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>