Merge tag 'v4.10-rc1' into asoc-intel
Linux 4.10-rc1
此提交包含在:
@@ -193,6 +193,7 @@ static int pin2port(struct hdac_device *codec, hda_nid_t pin_nid)
|
||||
* snd_hdac_sync_audio_rate - Set N/CTS based on the sample rate
|
||||
* @codec: HDA codec
|
||||
* @nid: the pin widget NID
|
||||
* @dev_id: device identifier
|
||||
* @rate: the sample rate to set
|
||||
*
|
||||
* 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)
|
||||
* This function sets N/CTS value based on the given sample rate.
|
||||
* Returns zero for success, or a negative error code.
|
||||
*/
|
||||
int snd_hdac_sync_audio_rate(struct hdac_device *codec, hda_nid_t nid, int rate)
|
||||
int snd_hdac_sync_audio_rate(struct hdac_device *codec, hda_nid_t nid,
|
||||
int dev_id, int rate)
|
||||
{
|
||||
struct hdac_bus *bus = codec->bus;
|
||||
struct i915_audio_component *acomp = bus->audio_component;
|
||||
int port;
|
||||
int port, pipe;
|
||||
|
||||
if (!acomp || !acomp->ops || !acomp->ops->sync_audio_rate)
|
||||
return -ENODEV;
|
||||
port = pin2port(codec, nid);
|
||||
if (port < 0)
|
||||
return -EINVAL;
|
||||
return acomp->ops->sync_audio_rate(acomp->dev, port, rate);
|
||||
pipe = dev_id;
|
||||
return acomp->ops->sync_audio_rate(acomp->dev, port, pipe, rate);
|
||||
}
|
||||
EXPORT_SYMBOL_GPL(snd_hdac_sync_audio_rate);
|
||||
|
||||
@@ -220,6 +223,7 @@ EXPORT_SYMBOL_GPL(snd_hdac_sync_audio_rate);
|
||||
* snd_hdac_acomp_get_eld - Get the audio state and ELD via component
|
||||
* @codec: HDA codec
|
||||
* @nid: the pin widget NID
|
||||
* @dev_id: device identifier
|
||||
* @audio_enabled: the pointer to store the current audio state
|
||||
* @buffer: the buffer pointer to store ELD bytes
|
||||
* @max_bytes: the max bytes to be stored on @buffer
|
||||
@@ -236,12 +240,12 @@ EXPORT_SYMBOL_GPL(snd_hdac_sync_audio_rate);
|
||||
* thus it may be over @max_bytes. If it's over @max_bytes, it implies
|
||||
* that only a part of ELD bytes have been fetched.
|
||||
*/
|
||||
int snd_hdac_acomp_get_eld(struct hdac_device *codec, hda_nid_t nid,
|
||||
int snd_hdac_acomp_get_eld(struct hdac_device *codec, hda_nid_t nid, int dev_id,
|
||||
bool *audio_enabled, char *buffer, int max_bytes)
|
||||
{
|
||||
struct hdac_bus *bus = codec->bus;
|
||||
struct i915_audio_component *acomp = bus->audio_component;
|
||||
int port;
|
||||
int port, pipe;
|
||||
|
||||
if (!acomp || !acomp->ops || !acomp->ops->get_eld)
|
||||
return -ENODEV;
|
||||
@@ -249,7 +253,9 @@ int snd_hdac_acomp_get_eld(struct hdac_device *codec, hda_nid_t nid,
|
||||
port = pin2port(codec, nid);
|
||||
if (port < 0)
|
||||
return -EINVAL;
|
||||
return acomp->ops->get_eld(acomp->dev, port, audio_enabled,
|
||||
|
||||
pipe = dev_id;
|
||||
return acomp->ops->get_eld(acomp->dev, port, pipe, audio_enabled,
|
||||
buffer, max_bytes);
|
||||
}
|
||||
EXPORT_SYMBOL_GPL(snd_hdac_acomp_get_eld);
|
||||
|
@@ -465,7 +465,7 @@ int snd_hdac_stream_set_params(struct hdac_stream *azx_dev,
|
||||
}
|
||||
EXPORT_SYMBOL_GPL(snd_hdac_stream_set_params);
|
||||
|
||||
static cycle_t azx_cc_read(const struct cyclecounter *cc)
|
||||
static u64 azx_cc_read(const struct cyclecounter *cc)
|
||||
{
|
||||
struct hdac_stream *azx_dev = container_of(cc, struct hdac_stream, cc);
|
||||
|
||||
@@ -473,7 +473,7 @@ static cycle_t azx_cc_read(const struct cyclecounter *cc)
|
||||
}
|
||||
|
||||
static void azx_timecounter_init(struct hdac_stream *azx_dev,
|
||||
bool force, cycle_t last)
|
||||
bool force, u64 last)
|
||||
{
|
||||
struct timecounter *tc = &azx_dev->tc;
|
||||
struct cyclecounter *cc = &azx_dev->cc;
|
||||
@@ -523,7 +523,7 @@ void snd_hdac_stream_timecounter_init(struct hdac_stream *azx_dev,
|
||||
struct snd_pcm_runtime *runtime = azx_dev->substream->runtime;
|
||||
struct hdac_stream *s;
|
||||
bool inited = false;
|
||||
cycle_t cycle_last = 0;
|
||||
u64 cycle_last = 0;
|
||||
int i = 0;
|
||||
|
||||
list_for_each_entry(s, &bus->stream_list, list) {
|
||||
|
新增問題並參考
封鎖使用者