Hi, the patch follows. The problem was with palmz72 which doesn't have the jack detection.
From 4b569013e47b03199d7efda812cb329736723f0a Mon Sep 17 00:00:00 2001 From: Marek Vasut <marek.vasut@xxxxxxxxx> Date: Mon, 1 Jun 2009 17:57:15 +0200 Subject: [PATCH 1/2] Palm27x-aSoC: Make it work without jack GPIO specified Signed-off-by: Marek Vasut <marek.vasut@xxxxxxxxx> --- sound/soc/pxa/palm27x.c | 41 +++++++++++++++++++++-------------------- 1 files changed, 21 insertions(+), 20 deletions(-) diff --git a/sound/soc/pxa/palm27x.c b/sound/soc/pxa/palm27x.c index e6102fd..628e13e 100644 --- a/sound/soc/pxa/palm27x.c +++ b/sound/soc/pxa/palm27x.c @@ -204,25 +204,22 @@ static int palm27x_asoc_probe(struct platform_device *pdev) { int ret; - if (!(machine_is_palmtx() || machine_is_palmt5() || - machine_is_palmld() || machine_is_palmte2())) - return -ENODEV; - - if (pdev->dev.platform_data) + if (pdev->dev.platform_data) { palm27x_ep_gpio = ((struct palm27x_asoc_info *) (pdev->dev.platform_data))->jack_gpio; - ret = gpio_request(palm27x_ep_gpio, "Headphone Jack"); - if (ret) - return ret; - ret = gpio_direction_input(palm27x_ep_gpio); - if (ret) - goto err_alloc; - - if (request_irq(gpio_to_irq(palm27x_ep_gpio), palm27x_interrupt, - IRQF_TRIGGER_RISING | IRQF_TRIGGER_FALLING, - "Headphone jack", NULL)) - goto err_alloc; + ret = gpio_request(palm27x_ep_gpio, "Headphone Jack"); + if (ret) + return ret; + ret = gpio_direction_input(palm27x_ep_gpio); + if (ret) + goto err_alloc; + + if (request_irq(gpio_to_irq(palm27x_ep_gpio), palm27x_interrupt, + IRQF_TRIGGER_RISING | IRQF_TRIGGER_FALLING, + "Headphone jack", NULL)) + goto err_alloc; + } palm27x_snd_device = platform_device_alloc("soc-audio", -1); if (!palm27x_snd_device) { @@ -242,17 +239,21 @@ static int palm27x_asoc_probe(struct platform_device *pdev) put_device: platform_device_put(palm27x_snd_device); err_dev: - free_irq(gpio_to_irq(palm27x_ep_gpio), NULL); + if (pdev->dev.platform_data) + free_irq(gpio_to_irq(palm27x_ep_gpio), NULL); err_alloc: - gpio_free(palm27x_ep_gpio); + if (pdev->dev.platform_data) + gpio_free(palm27x_ep_gpio); return ret; } static int __devexit palm27x_asoc_remove(struct platform_device *pdev) { - free_irq(gpio_to_irq(palm27x_ep_gpio), NULL); - gpio_free(palm27x_ep_gpio); + if (pdev->dev.platform_data) { + free_irq(gpio_to_irq(palm27x_ep_gpio), NULL); + gpio_free(palm27x_ep_gpio); + } platform_device_unregister(palm27x_snd_device); return 0; } -- 1.6.2.1
_______________________________________________ Alsa-devel mailing list Alsa-devel@xxxxxxxxxxxxxxxx http://mailman.alsa-project.org/mailman/listinfo/alsa-devel