summaryrefslogtreecommitdiff
path: root/sound/pci/hda/hda_generic.c
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2014-08-06 20:07:24 -0700
committerLinus Torvalds <torvalds@linux-foundation.org>2014-08-06 20:07:24 -0700
commit930e0312bcdc96d15f02ed6812d4a6c947855a2d (patch)
treed2d620c06359510562b25987cf329c77e41b7c11 /sound/pci/hda/hda_generic.c
parentec6c0a77786524e44003e70ea69651ad7fb35aec (diff)
parenta509574e5ea7b617268943526773ebf7e2d20a9b (diff)
downloadlinux-next-930e0312bcdc96d15f02ed6812d4a6c947855a2d.tar.gz
Merge tag 'sound-3.17-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound
Pull sound updates from Takashi Iwai: "There've been many updates in ASoC side at this time, especially the framework enhancement for multiple CODECs on a single DAI and more componentization works. The only major change in ALSA core is the addition of timestamp type in sw_params field. This should behave in backward compatible way. Other than that, there are lots of small changes and new drivers in wide range, including a large code cut in HD-audio driver for deprecated static quirks. Some highlights are below: ALSA Core: - Add the new timestamp type field to sw_params to choose MONOTONIC_RAW type HD-audio: - Continued conversion to standard printk macros, generic code cleanups - Removal of obsoleted static quirk codes for Conexant and C-Media codecs - Fixups for HP Envy TS, Dell XPS 15, HP and Dell mute/mic LED, Gigabyte BXBT-2807 mobo - Intel Braswell support ASoC: - Support for multiple CODECs attached to a single DAI, enabling systems with for example multiple DAC/speaker drivers on a single link, contributed by Benoit Cousson based on work from Misael Lopez Cruz - Support for byte controls larger than 256 bytes based on the use of TLVs contributed by Omair Mohammed Abdullah - More componentisation work from Lars-Peter Clausen - The remainder of the conversions of CODEC drivers to params_width() by Mark Brown - Drivers for Cirrus Logic CS4265, Freescale i.MX ASRC blocks, Realtek RT286 and RT5670, Rockchip RK3xxx I2S controllers and Texas Instruments TAS2552 - Lots of updates and fixes, especially to the DaVinci, Intel, Freescale, Realtek, and rcar drivers" * tag 'sound-3.17-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound: (402 commits) ALSA: usb-audio: Whitespace cleanups for sound/usb/midi.* ALSA: usb-audio: Respond to suspend and resume callbacks for MIDI input sound/oss/pss: Remove typedefs pss_mixerdata and pss_confdata sound/oss/opl3: Remove typedef opl_devinfo ALSA: fireworks: fix specifiers in format strings for propper output ASoC: imx-audmux: Use uintptr_t for port numbers ASoC: davinci: Enable menuconfig entry for McASP ASoC: fsl_asrc: Don't access members of config before checking it ASoC: fsl_sarc_dma: Check pair before using it ASoC: adau1977: Fix truncation warning on 64 bit architectures ALSA: virtuoso: add Xonar Essence STX II support ALSA: riptide: fix %d confusingly prefixed with 0x in format strings ALSA: fireworks: fix %d confusingly prefixed with 0x in format strings ALSA: hda - add codec ID for Braswell display audio codec ALSA: hda - add PCI IDs for Intel Braswell ALSA: usb-audio: Adjust Gamecom 780 volume level ALSA: usb-audio: improve dmesg source grepability ASoC: rt5670: Fix duplicate const warnings ASoC: rt5670: Staticise non-exported symbols ASoC: Intel: update stream only on stream IPC msgs ...
Diffstat (limited to 'sound/pci/hda/hda_generic.c')
-rw-r--r--sound/pci/hda/hda_generic.c22
1 files changed, 12 insertions, 10 deletions
diff --git a/sound/pci/hda/hda_generic.c b/sound/pci/hda/hda_generic.c
index 589e47c5aeb3..b956449ddada 100644
--- a/sound/pci/hda/hda_generic.c
+++ b/sound/pci/hda/hda_generic.c
@@ -350,16 +350,16 @@ static void print_nid_path(struct hda_codec *codec,
const char *pfx, struct nid_path *path)
{
char buf[40];
+ char *pos = buf;
int i;
+ *pos = 0;
+ for (i = 0; i < path->depth; i++)
+ pos += scnprintf(pos, sizeof(buf) - (pos - buf), "%s%02x",
+ pos != buf ? ":" : "",
+ path->path[i]);
- buf[0] = 0;
- for (i = 0; i < path->depth; i++) {
- char tmp[4];
- sprintf(tmp, ":%02x", path->path[i]);
- strlcat(buf, tmp, sizeof(buf));
- }
- codec_dbg(codec, "%s path: depth=%d %s\n", pfx, path->depth, buf);
+ codec_dbg(codec, "%s path: depth=%d '%s'\n", pfx, path->depth, buf);
}
/* called recursively */
@@ -1700,9 +1700,11 @@ static int fill_and_eval_dacs(struct hda_codec *codec,
#define DEBUG_BADNESS
#ifdef DEBUG_BADNESS
-#define debug_badness(fmt, args...) codec_dbg(codec, fmt, ##args)
+#define debug_badness(fmt, ...) \
+ codec_dbg(codec, fmt, ##__VA_ARGS__)
#else
-#define debug_badness(...)
+#define debug_badness(fmt, ...) \
+ do { if (0) codec_dbg(codec, fmt, ##__VA_ARGS__); } while (0)
#endif
#ifdef DEBUG_BADNESS
@@ -3054,7 +3056,7 @@ static int parse_capture_source(struct hda_codec *codec, hda_nid_t pin,
if (spec->hp_mic_pin == pin)
spec->hp_mic_mux_idx = imux->num_items;
spec->imux_pins[imux->num_items] = pin;
- snd_hda_add_imux_item(imux, label, cfg_idx, NULL);
+ snd_hda_add_imux_item(codec, imux, label, cfg_idx, NULL);
imux_added = true;
if (spec->dyn_adc_switch)
spec->dyn_adc_idx[imux_idx] = c;