History log of /linux-master/sound/hda/hdmi_chmap.c
Revision Date Author Comments
# 38d8be5d 26-Sep-2022 Takashi Iwai <tiwai@suse.de>

ALSA: hda: Replace runtime->status->state reference to runtime->state

The recent change in ALSA core allows drivers to get the current PCM
state directly from runtime object. Replace the calls accordingly.

Reviewed-by: Jaroslav Kysela <perex@perex.cz>
Link: https://lore.kernel.org/r/20220926135558.26580-6-tiwai@suse.de
Signed-off-by: Takashi Iwai <tiwai@suse.de>


# 44eeb081 18-Feb-2020 Takashi Iwai <tiwai@suse.de>

ALSA: hda: Use scnprintf() for printing texts for sysfs/procfs

Some code in HD-audio driver calls snprintf() in a loop and still
expects that the return value were actually written size, while
snprintf() returns the expected would-be length instead. When the
given buffer limit were small, this leads to a buffer overflow.

Use scnprintf() for addressing those issues. It returns the actually
written size unlike snprintf().

Cc: <stable@vger.kernel.org>
Link: https://lore.kernel.org/r/20200218091409.27162-1-tiwai@suse.de
Signed-off-by: Takashi Iwai <tiwai@suse.de>


# bf82326f 05-Jan-2020 Takashi Iwai <tiwai@suse.de>

ALSA: hda: More constifications

Apply const prefix to the remaining possible places: the string
tables, the rate tables, the verb tables, the index tables, etc.

Just for minor optimization and no functional changes.

Link: https://lore.kernel.org/r/20200105144823.29547-10-tiwai@suse.de
Signed-off-by: Takashi Iwai <tiwai@suse.de>


# 457c8996 19-May-2019 Thomas Gleixner <tglx@linutronix.de>

treewide: Add SPDX license identifier for missed files

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>


# c2432466 16-Nov-2017 Takashi Iwai <tiwai@suse.de>

ALSA: hda: Fix too short HDMI/DP chmap reporting

We got a regression report about the HD-audio HDMI chmap, where some
surround channels are reported as UNKNOWN. The git bisection pointed
the culprit at the commit 9b3dc8aa3fb1 ("ALSA: hda - Register chmap
obj as priv data instead of codec"). The story behind scene is like
this:

- While moving the code out of the legacy HDA to the HDA common place,
the patch modifies the code to obtain the chmap array indirectly in
a byte array, and it expands it to kctl value array.
- At the latter operation, the size of the array is wrongly passed by
sizeof() to the pointer.
- It can be 4 on 32bit arch, thus too short for 6+ channels.
(And that's the reason why it didn't hit other persons; it's 8 on
64bit arch, thus it's usually enough.)

The code was further changed meanwhile, but the problem persisted.
Let's fix it by correctly evaluating the array size.

Fixes: 9b3dc8aa3fb1 ("ALSA: hda - Register chmap obj as priv data instead of codec")
Reported-by: VDR User <user.vdr@gmail.com>
Cc: <stable@vger.kernel.org>
Signed-off-by: Takashi Iwai <tiwai@suse.de>


# 960a581e 15-Jun-2016 Libin Yang <libin.yang@linux.intel.com>

ALSA: hda: fix some klockwork scan warnings

This patch fixes some warnings from klockwork.

These warnings are not the real issues. The patch
adds the sanity check.

Signed-off-by: Libin Yang <libin.yang@linux.intel.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>


# 44fde3b8 04-Apr-2016 Subhransu S. Prusty <subhransu.s.prusty@intel.com>

ALSA: hda - Update chmap tlv to report sink's capability

The existing TLV callback implementation copies all of the
cea_channel_speaker_allocation map table to the TLV container
irrespective of what is reported by sink. This is of little use
to the userspace application.

With this patch, it parses the spk_alloc block as queried from
the ELD, and copies only the corresponding mapping channel
allocation entries from the cea channel speaker allocation table.
Thus the user can parse the TLV container to identify sink's
capability and set the channel map accordingly.

It shouldn't impact the behavior in AMD chipset, as this makes
use of already parsed spk alloc block to calculate the channel
map.

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>


# bb63f726 04-Mar-2016 Subhransu S. Prusty <subhransu.s.prusty@intel.com>

ALSA: hda - Use snd_hdac namespace prefix for chmap exported APIs

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>


# 2f6e8a85 04-Mar-2016 Subhransu S. Prusty <subhransu.s.prusty@intel.com>

ALSA: hda - Move chmap support helpers/ops to core

Chmap helpers, ops, controls are moved to core.

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>


# 739ffee9 04-Mar-2016 Subhransu S. Prusty <subhransu.s.prusty@intel.com>

ALSA: hda - Add hdmi chmap verb programming ops to chmap object

Add slot and channel count programming to hdmi_chmap object and
move the chmap_ops to core. Use register_chmap_ops API to
register for default ops. Override specific chmap ops in the
driver.

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>