Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 118633
b: refs/heads/master
c: 3ae7e2e
h: refs/heads/master
i:
  118631: 0bbbdce
v: v3
  • Loading branch information
Tim Blechmann authored and Takashi Iwai committed Nov 9, 2008
1 parent 34b3ead commit e78d5e8
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 5 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 00c9ddd1d4cc73aa0077f379279d716cb0ab0ba5
refs/heads/master: 3ae7e2e22900b90bbe1d19454405950893c110be
21 changes: 17 additions & 4 deletions trunk/sound/pci/rme9652/hdsp.c
Original file line number Diff line number Diff line change
Expand Up @@ -4548,11 +4548,20 @@ static int snd_hdsp_hwdep_ioctl(struct snd_hwdep *hw, struct file *file, unsigne
{
struct hdsp *hdsp = (struct hdsp *)hw->private_data;
void __user *argp = (void __user *)arg;
int err;

switch (cmd) {
case SNDRV_HDSP_IOCTL_GET_PEAK_RMS: {
struct hdsp_peak_rms __user *peak_rms = (struct hdsp_peak_rms __user *)arg;

err = hdsp_check_for_iobox(hdsp);
if (err < 0)
return err;

err = hdsp_check_for_firmware(hdsp, 1);
if (err < 0)
return err;

if (!(hdsp->state & HDSP_FirmwareLoaded)) {
snd_printk(KERN_ERR "Hammerfall-DSP: firmware needs to be uploaded to the card.\n");
return -EINVAL;
Expand All @@ -4572,10 +4581,14 @@ static int snd_hdsp_hwdep_ioctl(struct snd_hwdep *hw, struct file *file, unsigne
unsigned long flags;
int i;

if (!(hdsp->state & HDSP_FirmwareLoaded)) {
snd_printk(KERN_ERR "Hammerfall-DSP: Firmware needs to be uploaded to the card.\n");
return -EINVAL;
}
err = hdsp_check_for_iobox(hdsp);
if (err < 0)
return err;

err = hdsp_check_for_firmware(hdsp, 1);
if (err < 0)
return err;

spin_lock_irqsave(&hdsp->lock, flags);
info.pref_sync_ref = (unsigned char)hdsp_pref_sync_ref(hdsp);
info.wordclock_sync_check = (unsigned char)hdsp_wc_sync_check(hdsp);
Expand Down

0 comments on commit e78d5e8

Please sign in to comment.