C++ (Cpp) pr_debug Examples

C++ (Cpp) pr_debug - 30 examples found. These are the top rated real world C++ (Cpp) examples of pr_debug extracted from open source projects. You can rate examples to help us improve the quality of examples.
Example #1
0
static int __init ps3_register_sound_devices(void)
{
    int result;
    struct layout {
        struct ps3_system_bus_device dev;
        struct ps3_dma_region d_region;
        struct ps3_mmio_region m_region;
    } *p;

    pr_debug(" -> %s:%d\n", __func__, __LINE__);

    p = kzalloc(sizeof(*p), GFP_KERNEL);
    if (!p)
        return -ENOMEM;

    p->dev.match_id = PS3_MATCH_ID_SOUND;
    p->dev.dev_type = PS3_DEVICE_TYPE_IOC0;
    p->dev.d_region = &p->d_region;
    p->dev.m_region = &p->m_region;

    result = ps3_system_bus_device_register(&p->dev);

    if (result)
        pr_debug("%s:%d ps3_system_bus_device_register failed\n",
                 __func__, __LINE__);

    pr_debug(" <- %s:%d\n", __func__, __LINE__);
    return result;
}
Example #2
0
static int mtk_uldlloopbackpcm_close(struct snd_pcm_substream *substream)
{
    pr_debug("%s \n", __func__);
    if (substream->stream == SNDRV_PCM_STREAM_CAPTURE)
    {
        pr_debug("%s  with SNDRV_PCM_STREAM_CAPTURE \n", __func__);
        return 0;
    }

    // interconnection setting
    SetConnection(Soc_Aud_InterCon_DisConnect, Soc_Aud_InterConnectionInput_I03, Soc_Aud_InterConnectionOutput_O00);
    SetConnection(Soc_Aud_InterCon_DisConnect, Soc_Aud_InterConnectionInput_I04, Soc_Aud_InterConnectionOutput_O01);
    SetConnection(Soc_Aud_InterCon_DisConnect, Soc_Aud_InterConnectionInput_I03, Soc_Aud_InterConnectionOutput_O03);
    SetConnection(Soc_Aud_InterCon_DisConnect, Soc_Aud_InterConnectionInput_I04, Soc_Aud_InterConnectionOutput_O04);

    // stop I2S
    Afe_Set_Reg(AFE_I2S_CON3, 0x0, 0x1);
    SetMemoryPathEnable(Soc_Aud_Digital_Block_I2S_OUT_DAC, false);
    SetMemoryPathEnable(Soc_Aud_Digital_Block_I2S_IN_ADC, false);

    EnableAfe (false);

    AudDrv_Clk_Off();
    AudDrv_ADC_Clk_Off();

    return 0;
}
Example #3
0
static int __init ps3_setup_vuart_device(enum ps3_match_id match_id,
        unsigned int port_number)
{
    int result;
    struct layout {
        struct ps3_system_bus_device dev;
    } *p;

    pr_debug(" -> %s:%d: match_id %u, port %u\n", __func__, __LINE__,
             match_id, port_number);

    p = kzalloc(sizeof(struct layout), GFP_KERNEL);

    if (!p)
        return -ENOMEM;

    p->dev.match_id = match_id;
    p->dev.dev_type = PS3_DEVICE_TYPE_VUART;
    p->dev.port_number = port_number;

    result = ps3_system_bus_device_register(&p->dev);

    if (result)
        pr_debug("%s:%d ps3_system_bus_device_register failed\n",
                 __func__, __LINE__);

    pr_debug(" <- %s:%d\n", __func__, __LINE__);
    return result;
}
Example #4
0
static int sffsdr_hw_params(struct snd_pcm_substream *substream,
                            struct snd_pcm_hw_params *params)
{
    struct snd_soc_pcm_runtime *rtd = substream->private_data;
    struct snd_soc_dai *cpu_dai = rtd->cpu_dai;
    int fs;
    int ret = 0;

    /* Fsref can be 32000, 44100 or 48000. */
    fs = params_rate(params);

#ifndef CONFIG_SFFSDR_FPGA
    /* Without the FPGA module, the Fs is fixed at 44100 Hz */
    if (fs != 44100) {
        pr_debug("warning: only 44.1 kHz is supported without SFFSDR FPGA module\n");
        return -EINVAL;
    }
#endif

    /* set cpu DAI configuration */
    ret = snd_soc_dai_set_fmt(cpu_dai, AUDIO_FORMAT);
    if (ret < 0)
        return ret;

    pr_debug("sffsdr_hw_params: rate = %d Hz\n", fs);

#ifndef CONFIG_SFFSDR_FPGA
    return 0;
#else
    return sffsdr_fpga_set_codec_fs(fs);
#endif
}
Example #5
0
static int __init ps3_register_devices(void)
{
    int result;

    if (!firmware_has_feature(FW_FEATURE_PS3_LV1))
        return -ENODEV;

    pr_debug(" -> %s:%d\n", __func__, __LINE__);

    /* ps3_repository_dump_bus_info(); */

    result = ps3_start_probe_thread(PS3_BUS_TYPE_STORAGE);

    ps3_register_vuart_devices();

    ps3_register_graphics_devices();

    ps3_repository_find_devices(PS3_BUS_TYPE_SB,
                                ps3_register_repository_device);

    ps3_register_sound_devices();

    pr_debug(" <- %s:%d\n", __func__, __LINE__);
    return 0;
}
static void gs_close(struct tty_struct *tty, struct file *file)
{
    struct gs_port *port = tty->driver_data;
    struct gserial	*gser;

    spin_lock_irq(&port->port_lock);

    if (port->port.count != 1) {
        if (port->port.count == 0)
            WARN_ON(1);
        else
            --port->port.count;
        goto exit;
    }

    pr_debug("gs_close: ttyGS%d (%p,%p) ...\n", port->port_num, tty, file);

    /* mark port as closing but in use; we can drop port lock
     * and sleep if necessary
     */
    port->openclose = true;
    port->port.count = 0;

    gser = port->port_usb;
    if (gser && gser->disconnect)
        gser->disconnect(gser);

    /* wait for circular write buffer to drain, disconnect, or at
     * most GS_CLOSE_TIMEOUT seconds; then discard the rest
     */
    if (gs_buf_data_avail(&port->port_write_buf) > 0 && gser) {
        spin_unlock_irq(&port->port_lock);
        wait_event_interruptible_timeout(port->drain_wait,
                                         gs_writes_finished(port),
                                         GS_CLOSE_TIMEOUT * HZ);
        spin_lock_irq(&port->port_lock);
        gser = port->port_usb;
    }

    /* Iff we're disconnected, there can be no I/O in flight so it's
     * ok to free the circular buffer; else just scrub it.  And don't
     * let the push tasklet fire again until we're re-opened.
     */
    if (gser == NULL)
        gs_buf_free(&port->port_write_buf);
    else
        gs_buf_clear(&port->port_write_buf);

    tty->driver_data = NULL;
    port->port.tty = NULL;

    port->openclose = false;

    pr_debug("gs_close: ttyGS%d (%p,%p) done!\n",
             port->port_num, tty, file);

    wake_up(&port->port.close_wait);
exit:
    spin_unlock_irq(&port->port_lock);
}