hdac_device.c (9938b04472d5c59f8bd8152a548533a8599596a2) | hdac_device.c (3194ed497939c6448005542e3ca4fa2386968fa0) |
---|---|
1/* 2 * HD-audio codec core device 3 */ 4 5#include <linux/init.h> 6#include <linux/device.h> 7#include <linux/slab.h> 8#include <linux/module.h> --- 285 unchanged lines hidden (view full) --- 294 * @parm: parameter to read 295 * 296 * Returns -1 for error. If you need to distinguish the error more 297 * strictly, use snd_hdac_read() directly. 298 */ 299int snd_hdac_read_parm_uncached(struct hdac_device *codec, hda_nid_t nid, 300 int parm) 301{ | 1/* 2 * HD-audio codec core device 3 */ 4 5#include <linux/init.h> 6#include <linux/device.h> 7#include <linux/slab.h> 8#include <linux/module.h> --- 285 unchanged lines hidden (view full) --- 294 * @parm: parameter to read 295 * 296 * Returns -1 for error. If you need to distinguish the error more 297 * strictly, use snd_hdac_read() directly. 298 */ 299int snd_hdac_read_parm_uncached(struct hdac_device *codec, hda_nid_t nid, 300 int parm) 301{ |
302 int val; | 302 unsigned int cmd, val; |
303 | 303 |
304 if (codec->regmap) 305 regcache_cache_bypass(codec->regmap, true); 306 val = snd_hdac_read_parm(codec, nid, parm); 307 if (codec->regmap) 308 regcache_cache_bypass(codec->regmap, false); | 304 cmd = snd_hdac_regmap_encode_verb(nid, AC_VERB_PARAMETERS) | parm; 305 if (snd_hdac_regmap_read_raw_uncached(codec, cmd, &val) < 0) 306 return -1; |
309 return val; 310} 311EXPORT_SYMBOL_GPL(snd_hdac_read_parm_uncached); 312 313/** 314 * snd_hdac_override_parm - override read-only parameters 315 * @codec: the codec object 316 * @nid: NID for the parameter --- 774 unchanged lines hidden --- | 307 return val; 308} 309EXPORT_SYMBOL_GPL(snd_hdac_read_parm_uncached); 310 311/** 312 * snd_hdac_override_parm - override read-only parameters 313 * @codec: the codec object 314 * @nid: NID for the parameter --- 774 unchanged lines hidden --- |