1
0
Fork 0
Commit Graph

16 Commits (8e8e69d67e5fad1a1edf97acebd649a6c8f1febd)

Author SHA1 Message Date
Thomas Gleixner 8e8e69d67e treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 285
Based on 1 normalized pattern(s):

  this program is free software you can redistribute it and or modify
  it under the terms of the gnu general public license as published by
  the free software foundation version 2 of the license this program
  is distributed in the hope that it will be useful but without any
  warranty without even the implied warranty of merchantability or
  fitness for a particular purpose see the gnu general public license
  for more details

extracted by the scancode license scanner the SPDX license identifier

  GPL-2.0-only

has been chosen to replace the boilerplate/reference in 100 file(s).

Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Reviewed-by: Alexios Zavras <alexios.zavras@intel.com>
Reviewed-by: Allison Randal <allison@lohutok.net>
Cc: linux-spdx@vger.kernel.org
Link: https://lkml.kernel.org/r/20190529141900.918357685@linutronix.de
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2019-06-05 17:36:37 +02:00
Keyon Jie c32bf867cb ALSA: hda: Fix mismatch for register mask and value in ext controller.
E.g. for snd_hdac_ext_bus_link_power_up(), we should set mask to be
AZX_MLCTL_SPA(it was 0), and AZX_MLCTL_SPA as value to power up it,
here correct it and several similar mismatches.

Signed-off-by: Keyon Jie <yang.jie@linux.intel.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2018-10-02 17:10:48 +02:00
Rakesh Ughreja f8a7fe1aea ALSA: hdac: ext: add wait for codec to respond after link reset
As per HDA spec section 4.3 - Codec Discovery, the software shall wait
for atleast 521usec for codec to respond after link reset.
With the multi-link capability each link is turned ON/OFF individually.
Link controller drives reset signal when it is turned ON.

Signed-off-by: Rakesh Ughreja <rakesh.a.ughreja@intel.com>
Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2018-06-28 07:33:29 +02:00
Rakesh Ughreja 76f56fae1c ALSA: hdac: Remove usage of struct hdac_ext_bus and use hdac_bus instead
This patch removes the hdac_ext_bus structure. The legacy and
enhanced HDaudio capabilities can be handled in a backward-compatible
way without separate definitions.

Follow-up patches in this series handle the driver definition.

Signed-off-by: Rakesh Ughreja <rakesh.a.ughreja@intel.com>
Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2018-06-28 07:33:29 +02:00
Libin Yang dde5bff541 ALSA: hda - add more ML register definitions
This patch refines the definition of AZX_MLCTL_SPA and AZX_MLCTL_CPA
and add more definitions of ML registers

Signed-off-by: Libin Yang <libin.yang@intel.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2017-04-07 10:39:18 +02:00
Vinod Koul 404735c9fd 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 <vinod.koul@intel.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2016-08-09 08:53:56 +02:00
Vinod Koul ec8ae5703d ALSA: convert users to core bus_parse_capabilities
Now that we have the bus parse capabilities moved to core, we need to
convert users.

The SKL driver and HDA extended lib needs to converted in single patch,
otherwise we regress on the functionality.

Signed-off-by: Vinod Koul <vinod.koul@intel.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2016-08-09 08:53:56 +02:00
Vinod Koul 4446085d21 ALSA: hdac: add link pm and ref counting
The HDA links can be switched off when not is use, similarly
command DMA can be stopped as well. This calls for a reference
counting mechanism on the link by it's users to manage the link
power. The DMA can be turned off when all links are off

For this we add two APIs
	snd_hdac_ext_bus_link_get
	snd_hdac_ext_bus_link_put

They help users to turn up/down link and manage the DMA as well

Signed-off-by: Jeeja KP <jeeja.kp@intel.com>
Signed-off-by: Vinod Koul <vinod.koul@intel.com>
Acked-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Mark Brown <broonie@kernel.org>
2016-05-13 11:43:00 +01:00
Vinod Koul 6706a19747 ALSA: hdac: add snd_hdac_ext_bus_link_power_up_all
We have an API for powering down all links, we need a similar one
for powering up links, so add for power up as well

Signed-off-by: Jayachandran B <jayachandran.b@intel.com>
Signed-off-by: Subhransu S. Prusty <subhransu.s.prusty@intel.com>
Signed-off-by: Vinod Koul <vinod.koul@intel.com>
Reviewed-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Mark Brown <broonie@kernel.org>
2016-01-10 12:02:47 +00:00
Jayachandran B cf8fe58b10 ALSA: hdac: Increase timeout value for link power check
HW recommends 180us for worst case values for link power up
delay, so change the current delay value from 50 (150us) to 150
(450us)

Signed-off-by: Jayachandran B <jayachandran.b@intel.com>
Signed-off-by: Vinod Koul <vinod.koul@intel.com>
Reviewed-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Mark Brown <broonie@kernel.org>
2016-01-10 12:02:44 +00:00
Jeeja KP a9c48f7f59 ALSA: hdac: Add support for hda DMA Resume capability
Skylake sports new capability of DMA resume, DRSM where we can
resume the DMA. This capability is defined by presence of
AZX_DRSM_CAP_ID.

If this capability is present, we use this capability.
So we add:

snd_hdac_ext_stream_drsm_enable() - DMA resume caps
snd_hdac_ext_stream_set_dpibr() - set the DMA position
snd_hdac_ext_stream_set_lpib() - set the lpib

Signed-off-by: Jeeja KP <jeeja.kp@intel.com>
Signed-off-by: Vinod Koul <vinod.koul@intel.com>
Reviewed-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Mark Brown <broonie@kernel.org>
2016-01-10 12:02:30 +00:00
Jeeja KP c5b0c09b8f ALSA: hdac: Add snd_hdac_ext_bus_link_power_down_all()
New HDA controllers like Skylake sport multiple HDA links, so we need a
helper to turn off all the links in one go while suspending the device so
add snd_hdac_ext_bus_link_power_down_all() API

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-08-21 19:28:18 +02:00
Jeeja KP a7e3dd85ca ALSA: hdac: Fix to read the correct offset of spcap/link register
SPCAP and Mutilink register offset were incorrect as offset needs
to be based on capability offset. So correct the offset for
read/write of spcap/link register.

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-08-21 19:28:16 +02:00
Jeeja KP 5d942ce63c ALSA: HDA: Dont check return for snd_hdac_chip_readl
The snd_hdac_chip_readl return can never be less than zeros,
so no point in checking for the return value

This fixes following static checker warnings in
snd_hdac_ext_bus_parse_capabilities

       sound/hda/ext/hdac_ext_controller.c:47
 snd_hdac_ext_bus_parse_capabilities()
       warn: unsigned 'offset' is never less than zero.

       sound/hda/ext/hdac_ext_controller.c:54
 snd_hdac_ext_bus_parse_capabilities()
       warn: unsigned 'cur_cap' is never less than zero.

Signed-off-by: Jeeja KP <jeeja.kp@intel.com>
Reported-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Vinod Koul <vinod.koul@intel.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2015-08-04 07:04:46 +02:00
Vinod Koul bab4445f9a ALSA: hda: add hda link cleanup routine
In HDA extended bus the HDA link objects are created when multilink
capabilities are parsed. We need a routine which free up these link objects
for a bus. So add snd_hdac_link_free_all routine

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-06-17 12:33:08 +02:00
Jeeja KP 0b00a5615d ALSA: hdac_ext: add hdac extended controller
The controller needs to support the new capabilities and allow
reading, parsing and initializing of these capabilities, so this patch
does it

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-06-11 11:59:05 +02:00