|
@@ -90,50 +90,6 @@ static int codec_exec_verb(struct hdac_device *dev, unsigned int cmd,
|
|
|
return err;
|
|
|
}
|
|
|
|
|
|
-/**
|
|
|
- * snd_hda_codec_read - send a command and get the response
|
|
|
- * @codec: the HDA codec
|
|
|
- * @nid: NID to send the command
|
|
|
- * @flags: optional bit flags
|
|
|
- * @verb: the verb to send
|
|
|
- * @parm: the parameter for the verb
|
|
|
- *
|
|
|
- * Send a single command and read the corresponding response.
|
|
|
- *
|
|
|
- * Returns the obtained response value, or -1 for an error.
|
|
|
- */
|
|
|
-unsigned int snd_hda_codec_read(struct hda_codec *codec, hda_nid_t nid,
|
|
|
- int flags,
|
|
|
- unsigned int verb, unsigned int parm)
|
|
|
-{
|
|
|
- unsigned int cmd = snd_hdac_make_cmd(&codec->core, nid, verb, parm);
|
|
|
- unsigned int res;
|
|
|
- if (snd_hdac_exec_verb(&codec->core, cmd, flags, &res))
|
|
|
- return -1;
|
|
|
- return res;
|
|
|
-}
|
|
|
-EXPORT_SYMBOL_GPL(snd_hda_codec_read);
|
|
|
-
|
|
|
-/**
|
|
|
- * snd_hda_codec_write - send a single command without waiting for response
|
|
|
- * @codec: the HDA codec
|
|
|
- * @nid: NID to send the command
|
|
|
- * @flags: optional bit flags
|
|
|
- * @verb: the verb to send
|
|
|
- * @parm: the parameter for the verb
|
|
|
- *
|
|
|
- * Send a single command without waiting for response.
|
|
|
- *
|
|
|
- * Returns 0 if successful, or a negative error code.
|
|
|
- */
|
|
|
-int snd_hda_codec_write(struct hda_codec *codec, hda_nid_t nid, int flags,
|
|
|
- unsigned int verb, unsigned int parm)
|
|
|
-{
|
|
|
- unsigned int cmd = snd_hdac_make_cmd(&codec->core, nid, verb, parm);
|
|
|
- return snd_hdac_exec_verb(&codec->core, cmd, flags, NULL);
|
|
|
-}
|
|
|
-EXPORT_SYMBOL_GPL(snd_hda_codec_write);
|
|
|
-
|
|
|
/**
|
|
|
* snd_hda_sequence_write - sequence writes
|
|
|
* @codec: the HDA codec
|