summaryrefslogtreecommitdiffstats
path: root/sound/hda
diff options
context:
space:
mode:
authorDave Airlie <airlied@redhat.com>2016-10-25 02:36:13 -0400
committerDave Airlie <airlied@redhat.com>2016-10-25 02:39:43 -0400
commit5481e27f6fd06b7cb902072e81d6b083db8155eb (patch)
tree3bef5a7b19a3661e740d33754d1cf981f117ea66 /sound/hda
parent61d0a04d6f5b2122f88aacbc4b1716e571961660 (diff)
parent9558e74c26d2d63b9395f4d4153faa05f9de84f8 (diff)
Merge tag 'drm-intel-next-2016-10-24' of git://anongit.freedesktop.org/drm-intel into drm-next
- first slice of the gvt device model (Zhenyu et al) - compression support for gpu error states (Chris) - sunset clause on gpu errors resulting in dmesg noise telling users how to report them - .rodata diet from Tvrtko - switch over lots of macros to only take dev_priv (Tvrtko) - underrun suppression for dp link training (Ville) - lspcon (hmdi 2.0 on skl/bxt) support from Shashank Sharma, polish from Jani - gen9 wm fixes from Paulo&Lyude - updated ddi programming for kbl (Rodrigo) - respect alternate aux/ddc pins (from vbt) for all ddi ports (Ville) * tag 'drm-intel-next-2016-10-24' of git://anongit.freedesktop.org/drm-intel: (227 commits) drm/i915: Update DRIVER_DATE to 20161024 drm/i915: Stop setting SNB min-freq-table 0 on powersave setup drm/i915/dp: add lane_count check in intel_dp_check_link_status drm/i915: Fix whitespace issues drm/i915: Clean up DDI DDC/AUX CH sanitation drm/i915: Respect alternate_ddc_pin for all DDI ports drm/i915: Respect alternate_aux_channel for all DDI ports drm/i915/gen9: Remove WaEnableYV12BugFixInHalfSliceChicken7 drm/i915: KBL - Recommended buffer translation programming for DisplayPort drm/i915: Move down skl/kbl ddi iboost and n_edp_entires fixup drm/i915: Add a sunset clause to GPU hang logging drm/i915: Stop reporting error details in dmesg as well as the error-state drm/i915/gvt: do not ignore return value of create_scratch_page drm/i915/gvt: fix spare warnings on odd constant _Bool cast drm/i915/gvt: mark symbols static where possible drm/i915/gvt: fix sparse warnings on different address spaces drm/i915/gvt: properly access enabled intel_engine_cs drm/i915/gvt: Remove defunct vmap_batch() drm/i915/gvt: Use common mapping routines for shadow_bb object drm/i915/gvt: Use common mapping routines for indirect_ctx object ...
Diffstat (limited to 'sound/hda')
-rw-r--r--sound/hda/hdac_i915.c18
1 files changed, 12 insertions, 6 deletions
diff --git a/sound/hda/hdac_i915.c b/sound/hda/hdac_i915.c
index c9af022676c2..0659bf389489 100644
--- a/sound/hda/hdac_i915.c
+++ b/sound/hda/hdac_i915.c
@@ -193,6 +193,7 @@ static int pin2port(struct hdac_device *codec, hda_nid_t pin_nid)
193 * snd_hdac_sync_audio_rate - Set N/CTS based on the sample rate 193 * snd_hdac_sync_audio_rate - Set N/CTS based on the sample rate
194 * @codec: HDA codec 194 * @codec: HDA codec
195 * @nid: the pin widget NID 195 * @nid: the pin widget NID
196 * @dev_id: device identifier
196 * @rate: the sample rate to set 197 * @rate: the sample rate to set
197 * 198 *
198 * This function is supposed to be used only by a HD-audio controller 199 * This function is supposed to be used only by a HD-audio controller
@@ -201,18 +202,20 @@ static int pin2port(struct hdac_device *codec, hda_nid_t pin_nid)
201 * This function sets N/CTS value based on the given sample rate. 202 * This function sets N/CTS value based on the given sample rate.
202 * Returns zero for success, or a negative error code. 203 * Returns zero for success, or a negative error code.
203 */ 204 */
204int snd_hdac_sync_audio_rate(struct hdac_device *codec, hda_nid_t nid, int rate) 205int snd_hdac_sync_audio_rate(struct hdac_device *codec, hda_nid_t nid,
206 int dev_id, int rate)
205{ 207{
206 struct hdac_bus *bus = codec->bus; 208 struct hdac_bus *bus = codec->bus;
207 struct i915_audio_component *acomp = bus->audio_component; 209 struct i915_audio_component *acomp = bus->audio_component;
208 int port; 210 int port, pipe;
209 211
210 if (!acomp || !acomp->ops || !acomp->ops->sync_audio_rate) 212 if (!acomp || !acomp->ops || !acomp->ops->sync_audio_rate)
211 return -ENODEV; 213 return -ENODEV;
212 port = pin2port(codec, nid); 214 port = pin2port(codec, nid);
213 if (port < 0) 215 if (port < 0)
214 return -EINVAL; 216 return -EINVAL;
215 return acomp->ops->sync_audio_rate(acomp->dev, port, rate); 217 pipe = dev_id;
218 return acomp->ops->sync_audio_rate(acomp->dev, port, pipe, rate);
216} 219}
217EXPORT_SYMBOL_GPL(snd_hdac_sync_audio_rate); 220EXPORT_SYMBOL_GPL(snd_hdac_sync_audio_rate);
218 221
@@ -220,6 +223,7 @@ EXPORT_SYMBOL_GPL(snd_hdac_sync_audio_rate);
220 * snd_hdac_acomp_get_eld - Get the audio state and ELD via component 223 * snd_hdac_acomp_get_eld - Get the audio state and ELD via component
221 * @codec: HDA codec 224 * @codec: HDA codec
222 * @nid: the pin widget NID 225 * @nid: the pin widget NID
226 * @dev_id: device identifier
223 * @audio_enabled: the pointer to store the current audio state 227 * @audio_enabled: the pointer to store the current audio state
224 * @buffer: the buffer pointer to store ELD bytes 228 * @buffer: the buffer pointer to store ELD bytes
225 * @max_bytes: the max bytes to be stored on @buffer 229 * @max_bytes: the max bytes to be stored on @buffer
@@ -236,12 +240,12 @@ EXPORT_SYMBOL_GPL(snd_hdac_sync_audio_rate);
236 * thus it may be over @max_bytes. If it's over @max_bytes, it implies 240 * thus it may be over @max_bytes. If it's over @max_bytes, it implies
237 * that only a part of ELD bytes have been fetched. 241 * that only a part of ELD bytes have been fetched.
238 */ 242 */
239int snd_hdac_acomp_get_eld(struct hdac_device *codec, hda_nid_t nid, 243int snd_hdac_acomp_get_eld(struct hdac_device *codec, hda_nid_t nid, int dev_id,
240 bool *audio_enabled, char *buffer, int max_bytes) 244 bool *audio_enabled, char *buffer, int max_bytes)
241{ 245{
242 struct hdac_bus *bus = codec->bus; 246 struct hdac_bus *bus = codec->bus;
243 struct i915_audio_component *acomp = bus->audio_component; 247 struct i915_audio_component *acomp = bus->audio_component;
244 int port; 248 int port, pipe;
245 249
246 if (!acomp || !acomp->ops || !acomp->ops->get_eld) 250 if (!acomp || !acomp->ops || !acomp->ops->get_eld)
247 return -ENODEV; 251 return -ENODEV;
@@ -249,7 +253,9 @@ int snd_hdac_acomp_get_eld(struct hdac_device *codec, hda_nid_t nid,
249 port = pin2port(codec, nid); 253 port = pin2port(codec, nid);
250 if (port < 0) 254 if (port < 0)
251 return -EINVAL; 255 return -EINVAL;
252 return acomp->ops->get_eld(acomp->dev, port, audio_enabled, 256
257 pipe = dev_id;
258 return acomp->ops->get_eld(acomp->dev, port, pipe, audio_enabled,
253 buffer, max_bytes); 259 buffer, max_bytes);
254} 260}
255EXPORT_SYMBOL_GPL(snd_hdac_acomp_get_eld); 261EXPORT_SYMBOL_GPL(snd_hdac_acomp_get_eld);