Merge branch 'for-linus' of git://ftp.arm.linux.org.uk/~rmk/linux-arm
[firefly-linux-kernel-4.4.55.git] / sound / pci / echoaudio / layla20_dsp.c
index 53ce9460504413a0fabbc705623a0832cb8f188d..f2024a3565afaf71253405bf04b9c2e8aeed177a 100644 (file)
@@ -40,12 +40,12 @@ static int init_hw(struct echoaudio *chip, u16 device_id, u16 subdevice_id)
 {
        int err;
 
-       DE_INIT(("init_hw() - Layla20\n"));
        if (snd_BUG_ON((subdevice_id & 0xfff0) != LAYLA20))
                return -ENODEV;
 
        if ((err = init_dsp_comm_page(chip))) {
-               DE_INIT(("init_hw - could not initialize DSP comm page\n"));
+               dev_err(chip->card->dev,
+                       "init_hw - could not initialize DSP comm page\n");
                return err;
        }
 
@@ -64,7 +64,6 @@ static int init_hw(struct echoaudio *chip, u16 device_id, u16 subdevice_id)
                return err;
        chip->bad_board = FALSE;
 
-       DE_INIT(("init_hw done\n"));
        return err;
 }
 
@@ -121,7 +120,8 @@ static int check_asic_status(struct echoaudio *chip)
                /* The DSP will return a value to indicate whether or not
                   the ASIC is currently loaded */
                if (read_dsp(chip, &asic_status) < 0) {
-                       DE_ACT(("check_asic_status: failed on read_dsp\n"));
+                       dev_err(chip->card->dev,
+                               "check_asic_status: failed on read_dsp\n");
                        return -EIO;
                }
 
@@ -164,8 +164,8 @@ static int set_sample_rate(struct echoaudio *chip, u32 rate)
        /* Only set the clock for internal mode. Do not return failure,
           simply treat it as a non-event. */
        if (chip->input_clock != ECHO_CLOCK_INTERNAL) {
-               DE_ACT(("set_sample_rate: Cannot set sample rate - "
-                       "clock not set to CLK_CLOCKININTERNAL\n"));
+               dev_warn(chip->card->dev,
+                        "Cannot set sample rate - clock not set to CLK_CLOCKININTERNAL\n");
                chip->comm_page->sample_rate = cpu_to_le32(rate);
                chip->sample_rate = rate;
                return 0;
@@ -174,7 +174,7 @@ static int set_sample_rate(struct echoaudio *chip, u32 rate)
        if (wait_handshake(chip))
                return -EIO;
 
-       DE_ACT(("set_sample_rate(%d)\n", rate));
+       dev_dbg(chip->card->dev, "set_sample_rate(%d)\n", rate);
        chip->sample_rate = rate;
        chip->comm_page->sample_rate = cpu_to_le32(rate);
        clear_handshake(chip);
@@ -188,29 +188,25 @@ static int set_input_clock(struct echoaudio *chip, u16 clock_source)
        u16 clock;
        u32 rate;
 
-       DE_ACT(("set_input_clock:\n"));
        rate = 0;
        switch (clock_source) {
        case ECHO_CLOCK_INTERNAL:
-               DE_ACT(("Set Layla20 clock to INTERNAL\n"));
                rate = chip->sample_rate;
                clock = LAYLA20_CLOCK_INTERNAL;
                break;
        case ECHO_CLOCK_SPDIF:
-               DE_ACT(("Set Layla20 clock to SPDIF\n"));
                clock = LAYLA20_CLOCK_SPDIF;
                break;
        case ECHO_CLOCK_WORD:
-               DE_ACT(("Set Layla20 clock to WORD\n"));
                clock = LAYLA20_CLOCK_WORD;
                break;
        case ECHO_CLOCK_SUPER:
-               DE_ACT(("Set Layla20 clock to SUPER\n"));
                clock = LAYLA20_CLOCK_SUPER;
                break;
        default:
-               DE_ACT(("Input clock 0x%x not supported for Layla24\n",
-                       clock_source));
+               dev_err(chip->card->dev,
+                       "Input clock 0x%x not supported for Layla24\n",
+                       clock_source);
                return -EINVAL;
        }
        chip->input_clock = clock_source;
@@ -229,7 +225,6 @@ static int set_input_clock(struct echoaudio *chip, u16 clock_source)
 
 static int set_output_clock(struct echoaudio *chip, u16 clock)
 {
-       DE_ACT(("set_output_clock: %d\n", clock));
        switch (clock) {
        case ECHO_CLOCK_SUPER:
                clock = LAYLA20_OUTPUT_CLOCK_SUPER;
@@ -238,7 +233,7 @@ static int set_output_clock(struct echoaudio *chip, u16 clock)
                clock = LAYLA20_OUTPUT_CLOCK_WORD;
                break;
        default:
-               DE_ACT(("set_output_clock wrong clock\n"));
+               dev_err(chip->card->dev, "set_output_clock wrong clock\n");
                return -EINVAL;
        }
 
@@ -283,7 +278,6 @@ static int update_flags(struct echoaudio *chip)
 
 static int set_professional_spdif(struct echoaudio *chip, char prof)
 {
-       DE_ACT(("set_professional_spdif %d\n", prof));
        if (prof)
                chip->comm_page->flags |=
                        cpu_to_le32(DSP_FLAG_PROFESSIONAL_SPDIF);