diff mbox series

[3/4] media: em28xx: Set GPIOs for non-audio boards when switching input

Message ID 20240203124745.10257-4-nils.rothaug@gmx.de
State Superseded
Headers show
Series media: em28xx: Add support for MyGica UTV3 and its tuner | expand

Commit Message

Nils Rothaug Feb. 3, 2024, 12:47 p.m. UTC
Fixes changing the Line Out audio source with the video input on MyGica UTV3 board.
Previously, GPIOs were only set in em28xx_set_audio_source(), which only boards
with USB audio support reach.

Signed-off-by: Nils Rothaug <nils.rothaug@gmx.de>
---
 drivers/media/usb/em28xx/em28xx-core.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

--
2.34.1

Comments

Hans Verkuil June 7, 2024, 10:19 a.m. UTC | #1
On 03/02/2024 13:47, Nils Rothaug wrote:
> Fixes changing the Line Out audio source with the video input on MyGica UTV3 board.
> Previously, GPIOs were only set in em28xx_set_audio_source(), which only boards
> with USB audio support reach.
> 
> Signed-off-by: Nils Rothaug <nils.rothaug@gmx.de>
> ---
>  drivers/media/usb/em28xx/em28xx-core.c | 3 ++-
>  1 file changed, 2 insertions(+), 1 deletion(-)
> 
> diff --git a/drivers/media/usb/em28xx/em28xx-core.c b/drivers/media/usb/em28xx/em28xx-core.c
> index 61d7bf701d5..e390138f57e 100644
> --- a/drivers/media/usb/em28xx/em28xx-core.c
> +++ b/drivers/media/usb/em28xx/em28xx-core.c
> @@ -416,8 +416,9 @@ int em28xx_audio_analog_set(struct em28xx *dev)
>  	int ret, i;
>  	u8 xclk;
> 
> +	/* GPIOs are set later for boards with audio */

Shouldn't this comment read: "with USB audio"?

I think the comment is a bit confusing regardless. How about:

	/* Set the GPIO here for boards without USB audio */

Regards,

	Hans

>  	if (dev->int_audio_type == EM28XX_INT_AUDIO_NONE)
> -		return 0;
> +		return em28xx_gpio_set(dev, INPUT(dev->ctl_input)->gpio);
> 
>  	/*
>  	 * It is assumed that all devices use master volume for output.
> --
> 2.34.1
> 
>
diff mbox series

Patch

diff --git a/drivers/media/usb/em28xx/em28xx-core.c b/drivers/media/usb/em28xx/em28xx-core.c
index 61d7bf701d5..e390138f57e 100644
--- a/drivers/media/usb/em28xx/em28xx-core.c
+++ b/drivers/media/usb/em28xx/em28xx-core.c
@@ -416,8 +416,9 @@  int em28xx_audio_analog_set(struct em28xx *dev)
 	int ret, i;
 	u8 xclk;

+	/* GPIOs are set later for boards with audio */
 	if (dev->int_audio_type == EM28XX_INT_AUDIO_NONE)
-		return 0;
+		return em28xx_gpio_set(dev, INPUT(dev->ctl_input)->gpio);

 	/*
 	 * It is assumed that all devices use master volume for output.