Commit 6391f34e authored by Linus Torvalds's avatar Linus Torvalds

Merge tag 'sound-fix-3.16-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound

Pull sound fixes from Takashi Iwai:
 "Most of changes are small and easy cleanup or fixes:

   - a few HD-audio Realtek codec fixes and quirks
   - Intel HDMI audio fixes for Broadwell and Haswell / ValleyView
   - FireWire sound stack cleanups
   - a couple of sequencer core fixes
   - compress ABI fix for 64bit
   - conversion to modern ktime*() API"

* tag 'sound-fix-3.16-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound: (23 commits)
  ALSA: hda/realtek - Add more entry for enable HP mute led
  ALSA: hda - Add quirk for external mic on Lifebook U904
  ALSA: hda - fix a fixup value for codec alc293 in the pin_quirk table
  ALSA: intel8x0: Use ktime and ktime_get()
  ALSA: core: Use ktime_get_ts()
  ALSA: hda - verify pin:converter connection on unsol event for HSW and VLV
  ALSA: compress: Cancel the optimization of compiler and fix the size of struct for all platform.
  ALSA: hda - Add quirk for ABit AA8XE
  Revert "ALSA: hda - mask buggy stream DMA0 for Broadwell display controller"
  ALSA: hda - using POS_FIX_LPIB on Broadwell HDMI Audio
  ALSA: hda/realtek - Add support of ALC667 codec
  ALSA: hda/realtek - Add more codec rename
  ALSA: hda/realtek - New vendor ID for ALC233
  ALSA: hda - add two new pin tables
  ALSA: hda/realtek - Add support of ALC891 codec
  ALSA: seq: Continue broadcasting events to ports if one of them fails
  ALSA: bebob: Remove unused function prototype
  ALSA: fireworks: Remove meaningless mutex_destroy()
  ALSA: fireworks: Remove a constant over width to which it's applied
  ALSA: fireworks: Improve comments about Fireworks transaction
  ...
parents 4bdeb312 8a02b164
...@@ -932,7 +932,7 @@ static inline void snd_pcm_gettime(struct snd_pcm_runtime *runtime, ...@@ -932,7 +932,7 @@ static inline void snd_pcm_gettime(struct snd_pcm_runtime *runtime,
struct timespec *tv) struct timespec *tv)
{ {
if (runtime->tstamp_type == SNDRV_PCM_TSTAMP_TYPE_MONOTONIC) if (runtime->tstamp_type == SNDRV_PCM_TSTAMP_TYPE_MONOTONIC)
do_posix_clock_monotonic_gettime(tv); ktime_get_ts(tv);
else else
getnstimeofday(tv); getnstimeofday(tv);
} }
......
...@@ -80,7 +80,7 @@ struct snd_compr_tstamp { ...@@ -80,7 +80,7 @@ struct snd_compr_tstamp {
struct snd_compr_avail { struct snd_compr_avail {
__u64 avail; __u64 avail;
struct snd_compr_tstamp tstamp; struct snd_compr_tstamp tstamp;
}; } __attribute__((packed));
enum snd_compr_direction { enum snd_compr_direction {
SND_COMPRESS_PLAYBACK = 0, SND_COMPRESS_PLAYBACK = 0,
......
...@@ -660,7 +660,7 @@ static int deliver_to_subscribers(struct snd_seq_client *client, ...@@ -660,7 +660,7 @@ static int deliver_to_subscribers(struct snd_seq_client *client,
int atomic, int hop) int atomic, int hop)
{ {
struct snd_seq_subscribers *subs; struct snd_seq_subscribers *subs;
int err = 0, num_ev = 0; int err, result = 0, num_ev = 0;
struct snd_seq_event event_saved; struct snd_seq_event event_saved;
struct snd_seq_client_port *src_port; struct snd_seq_client_port *src_port;
struct snd_seq_port_subs_info *grp; struct snd_seq_port_subs_info *grp;
...@@ -685,8 +685,12 @@ static int deliver_to_subscribers(struct snd_seq_client *client, ...@@ -685,8 +685,12 @@ static int deliver_to_subscribers(struct snd_seq_client *client,
subs->info.flags & SNDRV_SEQ_PORT_SUBS_TIME_REAL); subs->info.flags & SNDRV_SEQ_PORT_SUBS_TIME_REAL);
err = snd_seq_deliver_single_event(client, event, err = snd_seq_deliver_single_event(client, event,
0, atomic, hop); 0, atomic, hop);
if (err < 0) if (err < 0) {
break; /* save first error that occurs and continue */
if (!result)
result = err;
continue;
}
num_ev++; num_ev++;
/* restore original event record */ /* restore original event record */
*event = event_saved; *event = event_saved;
...@@ -697,7 +701,7 @@ static int deliver_to_subscribers(struct snd_seq_client *client, ...@@ -697,7 +701,7 @@ static int deliver_to_subscribers(struct snd_seq_client *client,
up_read(&grp->list_mutex); up_read(&grp->list_mutex);
*event = event_saved; /* restore */ *event = event_saved; /* restore */
snd_seq_port_unlock(src_port); snd_seq_port_unlock(src_port);
return (err < 0) ? err : num_ev; return (result < 0) ? result : num_ev;
} }
...@@ -709,7 +713,7 @@ static int port_broadcast_event(struct snd_seq_client *client, ...@@ -709,7 +713,7 @@ static int port_broadcast_event(struct snd_seq_client *client,
struct snd_seq_event *event, struct snd_seq_event *event,
int atomic, int hop) int atomic, int hop)
{ {
int num_ev = 0, err = 0; int num_ev = 0, err, result = 0;
struct snd_seq_client *dest_client; struct snd_seq_client *dest_client;
struct snd_seq_client_port *port; struct snd_seq_client_port *port;
...@@ -724,14 +728,18 @@ static int port_broadcast_event(struct snd_seq_client *client, ...@@ -724,14 +728,18 @@ static int port_broadcast_event(struct snd_seq_client *client,
err = snd_seq_deliver_single_event(NULL, event, err = snd_seq_deliver_single_event(NULL, event,
SNDRV_SEQ_FILTER_BROADCAST, SNDRV_SEQ_FILTER_BROADCAST,
atomic, hop); atomic, hop);
if (err < 0) if (err < 0) {
break; /* save first error that occurs and continue */
if (!result)
result = err;
continue;
}
num_ev++; num_ev++;
} }
read_unlock(&dest_client->ports_lock); read_unlock(&dest_client->ports_lock);
snd_seq_client_unlock(dest_client); snd_seq_client_unlock(dest_client);
event->dest.port = SNDRV_SEQ_ADDRESS_BROADCAST; /* restore */ event->dest.port = SNDRV_SEQ_ADDRESS_BROADCAST; /* restore */
return (err < 0) ? err : num_ev; return (result < 0) ? result : num_ev;
} }
/* /*
...@@ -741,7 +749,7 @@ static int port_broadcast_event(struct snd_seq_client *client, ...@@ -741,7 +749,7 @@ static int port_broadcast_event(struct snd_seq_client *client,
static int broadcast_event(struct snd_seq_client *client, static int broadcast_event(struct snd_seq_client *client,
struct snd_seq_event *event, int atomic, int hop) struct snd_seq_event *event, int atomic, int hop)
{ {
int err = 0, num_ev = 0; int err, result = 0, num_ev = 0;
int dest; int dest;
struct snd_seq_addr addr; struct snd_seq_addr addr;
...@@ -760,12 +768,16 @@ static int broadcast_event(struct snd_seq_client *client, ...@@ -760,12 +768,16 @@ static int broadcast_event(struct snd_seq_client *client,
err = snd_seq_deliver_single_event(NULL, event, err = snd_seq_deliver_single_event(NULL, event,
SNDRV_SEQ_FILTER_BROADCAST, SNDRV_SEQ_FILTER_BROADCAST,
atomic, hop); atomic, hop);
if (err < 0) if (err < 0) {
break; /* save first error that occurs and continue */
if (!result)
result = err;
continue;
}
num_ev += err; num_ev += err;
} }
event->dest = addr; /* restore */ event->dest = addr; /* restore */
return (err < 0) ? err : num_ev; return (result < 0) ? result : num_ev;
} }
......
...@@ -124,7 +124,7 @@ int snd_seq_fifo_event_in(struct snd_seq_fifo *f, ...@@ -124,7 +124,7 @@ int snd_seq_fifo_event_in(struct snd_seq_fifo *f,
snd_use_lock_use(&f->use_lock); snd_use_lock_use(&f->use_lock);
err = snd_seq_event_dup(f->pool, event, &cell, 1, NULL); /* always non-blocking */ err = snd_seq_event_dup(f->pool, event, &cell, 1, NULL); /* always non-blocking */
if (err < 0) { if (err < 0) {
if (err == -ENOMEM) if ((err == -ENOMEM) || (err == -EAGAIN))
atomic_inc(&f->overflow); atomic_inc(&f->overflow);
snd_use_lock_free(&f->use_lock); snd_use_lock_free(&f->use_lock);
return err; return err;
......
...@@ -390,7 +390,7 @@ static void snd_timer_notify1(struct snd_timer_instance *ti, int event) ...@@ -390,7 +390,7 @@ static void snd_timer_notify1(struct snd_timer_instance *ti, int event)
struct timespec tstamp; struct timespec tstamp;
if (timer_tstamp_monotonic) if (timer_tstamp_monotonic)
do_posix_clock_monotonic_gettime(&tstamp); ktime_get_ts(&tstamp);
else else
getnstimeofday(&tstamp); getnstimeofday(&tstamp);
if (snd_BUG_ON(event < SNDRV_TIMER_EVENT_START || if (snd_BUG_ON(event < SNDRV_TIMER_EVENT_START ||
...@@ -1203,7 +1203,7 @@ static void snd_timer_user_tinterrupt(struct snd_timer_instance *timeri, ...@@ -1203,7 +1203,7 @@ static void snd_timer_user_tinterrupt(struct snd_timer_instance *timeri,
} }
if (tu->last_resolution != resolution || ticks > 0) { if (tu->last_resolution != resolution || ticks > 0) {
if (timer_tstamp_monotonic) if (timer_tstamp_monotonic)
do_posix_clock_monotonic_gettime(&tstamp); ktime_get_ts(&tstamp);
else else
getnstimeofday(&tstamp); getnstimeofday(&tstamp);
} }
......
...@@ -208,8 +208,6 @@ int snd_bebob_stream_set_rate(struct snd_bebob *bebob, unsigned int rate); ...@@ -208,8 +208,6 @@ int snd_bebob_stream_set_rate(struct snd_bebob *bebob, unsigned int rate);
int snd_bebob_stream_check_internal_clock(struct snd_bebob *bebob, int snd_bebob_stream_check_internal_clock(struct snd_bebob *bebob,
bool *internal); bool *internal);
int snd_bebob_stream_discover(struct snd_bebob *bebob); int snd_bebob_stream_discover(struct snd_bebob *bebob);
int snd_bebob_stream_map(struct snd_bebob *bebob,
struct amdtp_stream *stream);
int snd_bebob_stream_init_duplex(struct snd_bebob *bebob); int snd_bebob_stream_init_duplex(struct snd_bebob *bebob);
int snd_bebob_stream_start_duplex(struct snd_bebob *bebob, unsigned int rate); int snd_bebob_stream_start_duplex(struct snd_bebob *bebob, unsigned int rate);
void snd_bebob_stream_stop_duplex(struct snd_bebob *bebob); void snd_bebob_stream_stop_duplex(struct snd_bebob *bebob);
......
...@@ -655,8 +655,6 @@ void snd_bebob_stream_stop_duplex(struct snd_bebob *bebob) ...@@ -655,8 +655,6 @@ void snd_bebob_stream_stop_duplex(struct snd_bebob *bebob)
struct amdtp_stream *master, *slave; struct amdtp_stream *master, *slave;
atomic_t *master_substreams, *slave_substreams; atomic_t *master_substreams, *slave_substreams;
mutex_lock(&bebob->mutex);
if (bebob->master == &bebob->rx_stream) { if (bebob->master == &bebob->rx_stream) {
slave = &bebob->tx_stream; slave = &bebob->tx_stream;
master = &bebob->rx_stream; master = &bebob->rx_stream;
...@@ -669,6 +667,8 @@ void snd_bebob_stream_stop_duplex(struct snd_bebob *bebob) ...@@ -669,6 +667,8 @@ void snd_bebob_stream_stop_duplex(struct snd_bebob *bebob)
master_substreams = &bebob->capture_substreams; master_substreams = &bebob->capture_substreams;
} }
mutex_lock(&bebob->mutex);
if (atomic_read(slave_substreams) == 0) { if (atomic_read(slave_substreams) == 0) {
amdtp_stream_pcm_abort(slave); amdtp_stream_pcm_abort(slave);
amdtp_stream_stop(slave); amdtp_stream_stop(slave);
......
...@@ -346,7 +346,6 @@ static void __exit snd_efw_exit(void) ...@@ -346,7 +346,6 @@ static void __exit snd_efw_exit(void)
{ {
snd_efw_transaction_unregister(); snd_efw_transaction_unregister();
driver_unregister(&efw_driver.driver); driver_unregister(&efw_driver.driver);
mutex_destroy(&devices_mutex);
} }
module_init(snd_efw_init); module_init(snd_efw_init);
......
...@@ -162,7 +162,6 @@ enum snd_efw_grp_type { ...@@ -162,7 +162,6 @@ enum snd_efw_grp_type {
SND_EFW_CH_TYPE_GUITAR = 7, SND_EFW_CH_TYPE_GUITAR = 7,
SND_EFW_CH_TYPE_PIEZO_GUITAR = 8, SND_EFW_CH_TYPE_PIEZO_GUITAR = 8,
SND_EFW_CH_TYPE_GUITAR_STRING = 9, SND_EFW_CH_TYPE_GUITAR_STRING = 9,
SND_EFW_CH_TYPE_VIRTUAL = 0x10000,
SND_EFW_CH_TYPE_DUMMY SND_EFW_CH_TYPE_DUMMY
}; };
struct snd_efw_phys_meters { struct snd_efw_phys_meters {
......
...@@ -58,7 +58,7 @@ hwdep_read_resp_buf(struct snd_efw *efw, char __user *buf, long remained, ...@@ -58,7 +58,7 @@ hwdep_read_resp_buf(struct snd_efw *efw, char __user *buf, long remained,
efw->pull_ptr += till_end; efw->pull_ptr += till_end;
if (efw->pull_ptr >= efw->resp_buf + if (efw->pull_ptr >= efw->resp_buf +
snd_efw_resp_buf_size) snd_efw_resp_buf_size)
efw->pull_ptr = efw->resp_buf; efw->pull_ptr -= snd_efw_resp_buf_size;
length -= till_end; length -= till_end;
buf += till_end; buf += till_end;
......
...@@ -284,8 +284,6 @@ void snd_efw_stream_stop_duplex(struct snd_efw *efw) ...@@ -284,8 +284,6 @@ void snd_efw_stream_stop_duplex(struct snd_efw *efw)
struct amdtp_stream *master, *slave; struct amdtp_stream *master, *slave;
atomic_t *master_substreams, *slave_substreams; atomic_t *master_substreams, *slave_substreams;
mutex_lock(&efw->mutex);
if (efw->master == &efw->rx_stream) { if (efw->master == &efw->rx_stream) {
slave = &efw->tx_stream; slave = &efw->tx_stream;
master = &efw->rx_stream; master = &efw->rx_stream;
...@@ -298,6 +296,8 @@ void snd_efw_stream_stop_duplex(struct snd_efw *efw) ...@@ -298,6 +296,8 @@ void snd_efw_stream_stop_duplex(struct snd_efw *efw)
master_substreams = &efw->capture_substreams; master_substreams = &efw->capture_substreams;
} }
mutex_lock(&efw->mutex);
if (atomic_read(slave_substreams) == 0) { if (atomic_read(slave_substreams) == 0) {
stop_stream(efw, slave); stop_stream(efw, slave);
......
...@@ -8,19 +8,19 @@ ...@@ -8,19 +8,19 @@
/* /*
* Fireworks have its own transaction. The transaction can be delivered by AV/C * Fireworks have its own transaction. The transaction can be delivered by AV/C
* Vendor Specific command. But at least Windows driver and firmware version 5.5 * Vendor Specific command frame or usual asynchronous transaction. At least,
* or later don't use it. * Windows driver and firmware version 5.5 or later don't use AV/C command.
* *
* Transaction substance: * Transaction substance:
* At first, 6 data exist. Following to the 6 data, parameters for each * At first, 6 data exist. Following to the data, parameters for each command
* commands exists. All of parameters are 32 bit alighed to big endian. * exist. All of the parameters are 32 bit alighed to big endian.
* data[0]: Length of transaction substance * data[0]: Length of transaction substance
* data[1]: Transaction version * data[1]: Transaction version
* data[2]: Sequence number. This is incremented by the device * data[2]: Sequence number. This is incremented by the device
* data[3]: transaction category * data[3]: Transaction category
* data[4]: transaction command * data[4]: Transaction command
* data[5]: return value in response. * data[5]: Return value in response.
* data[6-]: parameters * data[6-]: Parameters
* *
* Transaction address: * Transaction address:
* command: 0xecc000000000 * command: 0xecc000000000
...@@ -148,7 +148,7 @@ copy_resp_to_buf(struct snd_efw *efw, void *data, size_t length, int *rcode) ...@@ -148,7 +148,7 @@ copy_resp_to_buf(struct snd_efw *efw, void *data, size_t length, int *rcode)
efw->push_ptr += till_end; efw->push_ptr += till_end;
if (efw->push_ptr >= efw->resp_buf + snd_efw_resp_buf_size) if (efw->push_ptr >= efw->resp_buf + snd_efw_resp_buf_size)
efw->push_ptr = efw->resp_buf; efw->push_ptr -= snd_efw_resp_buf_size;
length -= till_end; length -= till_end;
data += till_end; data += till_end;
......
...@@ -237,6 +237,12 @@ enum { ...@@ -237,6 +237,12 @@ enum {
AZX_DCAPS_COUNT_LPIB_DELAY | AZX_DCAPS_PM_RUNTIME | \ AZX_DCAPS_COUNT_LPIB_DELAY | AZX_DCAPS_PM_RUNTIME | \
AZX_DCAPS_I915_POWERWELL) AZX_DCAPS_I915_POWERWELL)
/* Broadwell HDMI can't use position buffer reliably, force to use LPIB */
#define AZX_DCAPS_INTEL_BROADWELL \
(AZX_DCAPS_SCH_SNOOP | AZX_DCAPS_ALIGN_BUFSIZE | \
AZX_DCAPS_POSFIX_LPIB | AZX_DCAPS_PM_RUNTIME | \
AZX_DCAPS_I915_POWERWELL)
/* quirks for ATI SB / AMD Hudson */ /* quirks for ATI SB / AMD Hudson */
#define AZX_DCAPS_PRESET_ATI_SB \ #define AZX_DCAPS_PRESET_ATI_SB \
(AZX_DCAPS_ATI_SNOOP | AZX_DCAPS_NO_TCSEL | \ (AZX_DCAPS_ATI_SNOOP | AZX_DCAPS_NO_TCSEL | \
...@@ -1367,12 +1373,6 @@ static int azx_first_init(struct azx *chip) ...@@ -1367,12 +1373,6 @@ static int azx_first_init(struct azx *chip)
/* initialize streams */ /* initialize streams */
azx_init_stream(chip); azx_init_stream(chip);
/* workaround for Broadwell HDMI: the first stream is broken,
* so mask it by keeping it as if opened
*/
if (pci->vendor == 0x8086 && pci->device == 0x160c)
chip->azx_dev[0].opened = 1;
/* initialize chip */ /* initialize chip */
azx_init_pci(chip); azx_init_pci(chip);
azx_init_chip(chip, (probe_only[dev] & 2) == 0); azx_init_chip(chip, (probe_only[dev] & 2) == 0);
...@@ -1769,7 +1769,7 @@ static const struct pci_device_id azx_ids[] = { ...@@ -1769,7 +1769,7 @@ static const struct pci_device_id azx_ids[] = {
.driver_data = AZX_DRIVER_HDMI | AZX_DCAPS_INTEL_HASWELL }, .driver_data = AZX_DRIVER_HDMI | AZX_DCAPS_INTEL_HASWELL },
/* Broadwell */ /* Broadwell */
{ PCI_DEVICE(0x8086, 0x160c), { PCI_DEVICE(0x8086, 0x160c),
.driver_data = AZX_DRIVER_HDMI | AZX_DCAPS_INTEL_HASWELL }, .driver_data = AZX_DRIVER_HDMI | AZX_DCAPS_INTEL_BROADWELL },
/* 5 Series/3400 */ /* 5 Series/3400 */
{ PCI_DEVICE(0x8086, 0x3b56), { PCI_DEVICE(0x8086, 0x3b56),
.driver_data = AZX_DRIVER_SCH | AZX_DCAPS_INTEL_PCH_NOPM }, .driver_data = AZX_DRIVER_SCH | AZX_DCAPS_INTEL_PCH_NOPM },
......
...@@ -1594,11 +1594,19 @@ static bool hdmi_present_sense(struct hdmi_spec_per_pin *per_pin, int repoll) ...@@ -1594,11 +1594,19 @@ static bool hdmi_present_sense(struct hdmi_spec_per_pin *per_pin, int repoll)
* Re-setup pin and infoframe. This is needed e.g. when * Re-setup pin and infoframe. This is needed e.g. when
* - sink is first plugged-in (infoframe is not set up if !monitor_present) * - sink is first plugged-in (infoframe is not set up if !monitor_present)
* - transcoder can change during stream playback on Haswell * - transcoder can change during stream playback on Haswell
* and this can make HW reset converter selection on a pin.
*/ */
if (eld->eld_valid && !old_eld_valid && per_pin->setup) if (eld->eld_valid && !old_eld_valid && per_pin->setup) {
if (is_haswell_plus(codec) || is_valleyview(codec)) {
intel_verify_pin_cvt_connect(codec, per_pin);
intel_not_share_assigned_cvt(codec, pin_nid,
per_pin->mux_idx);
}
hdmi_setup_audio_infoframe(codec, per_pin, hdmi_setup_audio_infoframe(codec, per_pin,
per_pin->non_pcm); per_pin->non_pcm);
} }
}
if (eld_changed) if (eld_changed)
snd_ctl_notify(codec->bus->card, snd_ctl_notify(codec->bus->card,
......
This diff is collapsed.
...@@ -2779,7 +2779,7 @@ static void intel8x0_measure_ac97_clock(struct intel8x0 *chip) ...@@ -2779,7 +2779,7 @@ static void intel8x0_measure_ac97_clock(struct intel8x0 *chip)
unsigned long port; unsigned long port;
unsigned long pos, pos1, t; unsigned long pos, pos1, t;
int civ, timeout = 1000, attempt = 1; int civ, timeout = 1000, attempt = 1;
struct timespec start_time, stop_time; ktime_t start_time, stop_time;
if (chip->ac97_bus->clock != 48000) if (chip->ac97_bus->clock != 48000)
return; /* specified in module option */ return; /* specified in module option */
...@@ -2813,7 +2813,7 @@ static void intel8x0_measure_ac97_clock(struct intel8x0 *chip) ...@@ -2813,7 +2813,7 @@ static void intel8x0_measure_ac97_clock(struct intel8x0 *chip)
iputbyte(chip, port + ICH_REG_OFF_CR, ICH_IOCE); iputbyte(chip, port + ICH_REG_OFF_CR, ICH_IOCE);
iputdword(chip, ICHREG(ALI_DMACR), 1 << ichdev->ali_slot); iputdword(chip, ICHREG(ALI_DMACR), 1 << ichdev->ali_slot);
} }
do_posix_clock_monotonic_gettime(&start_time); start_time = ktime_get();
spin_unlock_irq(&chip->reg_lock); spin_unlock_irq(&chip->reg_lock);
msleep(50); msleep(50);
spin_lock_irq(&chip->reg_lock); spin_lock_irq(&chip->reg_lock);
...@@ -2837,7 +2837,7 @@ static void intel8x0_measure_ac97_clock(struct intel8x0 *chip) ...@@ -2837,7 +2837,7 @@ static void intel8x0_measure_ac97_clock(struct intel8x0 *chip)
pos += ichdev->position; pos += ichdev->position;
} }
chip->in_measurement = 0; chip->in_measurement = 0;
do_posix_clock_monotonic_gettime(&stop_time); stop_time = ktime_get();
/* stop */ /* stop */
if (chip->device_type == DEVICE_ALI) { if (chip->device_type == DEVICE_ALI) {
iputdword(chip, ICHREG(ALI_DMACR), 1 << (ichdev->ali_slot + 16)); iputdword(chip, ICHREG(ALI_DMACR), 1 << (ichdev->ali_slot + 16));
...@@ -2865,9 +2865,7 @@ static void intel8x0_measure_ac97_clock(struct intel8x0 *chip) ...@@ -2865,9 +2865,7 @@ static void intel8x0_measure_ac97_clock(struct intel8x0 *chip)
} }
pos /= 4; pos /= 4;
t = stop_time.tv_sec - start_time.tv_sec; t = ktime_us_delta(stop_time, start_time);
t *= 1000000;
t += (stop_time.tv_nsec - start_time.tv_nsec) / 1000;
dev_info(chip->card->dev, dev_info(chip->card->dev,
"%s: measured %lu usecs (%lu samples)\n", __func__, t, pos); "%s: measured %lu usecs (%lu samples)\n", __func__, t, pos);
if (t == 0) { if (t == 0) {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment