Skip to content

Commit

Permalink
Add sound/ modifications
Browse files Browse the repository at this point in the history
Signed-off-by: ShivamKumarJha <[email protected]>
  • Loading branch information
ShivamKumarJha committed Mar 30, 2021
1 parent 4465be3 commit f5afc9d
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 0 deletions.
5 changes: 5 additions & 0 deletions sound/soc/soc-dapm.c
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
* soc-dapm.c -- ALSA SoC Dynamic Audio Power Management
*
* Copyright 2005 Wolfson Microelectronics PLC.
* Copyright (C) 2021 XiaoMi, Inc.
* Author: Liam Girdwood <[email protected]>
*
* This program is free software; you can redistribute it and/or modify it
Expand Down Expand Up @@ -1164,6 +1165,10 @@ static __always_inline int is_connected_ep(struct snd_soc_dapm_widget *widget,
struct snd_soc_dapm_path *path;
int con = 0;

if (NULL == widget) {
printk("is_connected_input_ep: widget is null");
return 0;
}
if (widget->endpoints[dir] >= 0)
return widget->endpoints[dir];

Expand Down
3 changes: 3 additions & 0 deletions sound/soc/soc-pcm.c
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
* soc-pcm.c -- ALSA SoC PCM
*
* Copyright 2005 Wolfson Microelectronics PLC.
* Copyright (C) 2021 XiaoMi, Inc.
* Copyright 2005 Openedhand Ltd.
* Copyright (C) 2010 Slimlogic Ltd.
* Copyright (C) 2010 Texas Instruments Inc.
Expand Down Expand Up @@ -46,6 +47,8 @@ static const struct snd_pcm_hardware no_host_hardware = {
SNDRV_PCM_INFO_PAUSE |
SNDRV_PCM_INFO_RESUME,
.formats = SNDRV_PCM_FMTBIT_S16_LE |
SNDRV_PCM_FMTBIT_S24_LE |
SNDRV_PCM_FMTBIT_S24_3LE |
SNDRV_PCM_FMTBIT_S32_LE,
.period_bytes_min = PAGE_SIZE >> 2,
.period_bytes_max = PAGE_SIZE >> 1,
Expand Down

0 comments on commit f5afc9d

Please sign in to comment.